last line navigates and inlines the related Item entities within each Order.
Other query constructs, such as $se-lect, $orderby, $top and $skip, are
also supported as part of a request.
To provide interested readers with
a bit more detail, a graphical repre-
sentation of the external model (EDM)
together with examples of the OData
data service metadata and an AtomPub
response from an OData service can be
found in the sidebar “Service-Enabling
Data Sources.”
Driven by the mapping between
the EDM model and the underlying
data store’s relational model, the WCF
Data Services framework automati-
cally translates the above request into
the query language of the store. In our
example then, under the covers, the
above request would be translated into
the following SQL query involving a left
outer join:
products in this space.)
figure 3. integrating and service-enabling enterprise data.
SELECT Order.*, Item.*
FROM Customer JOIN Order LEFT OUTER JOIN Item
WHERE Customer.cid=’C43’
AND Order.status=’open’
The WCF Data Services framework
can also publish stored procedures as
part of an OData service, called Func-
tion Imports, which can be used for any
of the CRUD operations and are inte-
grated in the same URI-based query
interface.
integrated Data services
In the second data service usage scenario, data services are created to integrate as well as to service-enable a
collection of data sources. The underlying sources are often heterogeneous in
nature. The result of integration is that
consumers of a data service see what
appears to be one coherent, service-enabled data source rather than being
faced with a hodgepodge of disparate
schemas and data access APIs.
Figure 3 shows an example usage
scenario. We will illustrate this use case
using a commercial data services mid-dleware platform, the AquaLogic Data
Services Platform, ALDSP,
13 developed
at BEA Systems and later rebranded
as ODSI, the Oracle Data Services Integrator.
38 ODSI is based on a functional
model44 and the functional data service
consuming method of Figure 1. (Again,
we use ODSI as just one example of the
Data Service
External
Model
IntegratedCustomer
Orders
Items
getAllCustomers()
Integration
Order
Orders
Integration Query
Items
Item
Physical
Data
Service
Physical
Data
Service
Customer
cid
state
Model Mapping
Model Mapping
Data
Service
GetOrdersByCid()
Web Service
Cloud Data
Order
Orders
Items
Item
RDBMS
Customer
cid state
C43 NY
C86 CA
…
Functional
Queryable
Diverse Data Sources