Database Reference
In-Depth Information
It doesn't matter if you have a basic set of reference data or are architecting an enterprise-size web
application: OData facilitates the exposure of your data and associated logic as OData feeds, thus
making the data available to be consumed by any OData-aware consumers such as business intelligence
tools and products as well as developer tools and libraries.
OData Producers
An OData producer is a service or application that exposes its data using the OData protocol. For
example, you can deduce that because this topic—and, specifically, this chapter—pertains to SQL Azure
and OData, SQL Azure can expose data as OData. But so can SQL Server Reporting Services and
SharePoint 2010, among other applications. Later in this chapter, you walk through how to expose an
OData service on your SQL Azure database.
Many public (or live ) OData services have been made available, which anyone can consume in an
application. For example, Stack Overflow, NerdDinner, and even Netflix have partnered with Microsoft
to create an OData API. You can view a complete list of such OData producers, or services, at
www.odata.org/producers .
Note Let's take a quick look at Netflix's OData service. Open your web browser, and navigate to
http://OData.netflix.com/Catalog . The examples in this chapter used Internet Explorer 7.0 or greater. Using
Firefox or Chrome might yield different results.
In the browser, you see a list of the categories by which you can browse or search for a movie offered
by Netflix, as shown in Figure 7-1. Now, if you didn't skip reading Chapter 6, you probably look at Figure
7-1 and think, “This looks a lot like WCF Data Services.” That is correct, because, as stated earlier, OData
facilitates the exposure of your data and associated logic as OData feeds , making it much easier via a
standardized method to consume data regardless of the source or consuming application.
Thus, in Figure 7-1 you can see the categories via which you can search Netflix movie catalog. For
example, you can see the different endpoints of the API through which to find a movie, such as Titles,
People, Languages, and Genres.
As you learned in Chapter 6, you can begin navigating through the vast Netflix catalog by entering
your query as a URI. For example, let's look at all the different genres offered by Netflix. The URI is
http://OData.netflix.com/Catalog/Genres
You're given a list of genres, each of which is in an <entry> element with the name of the genre in
the <Name> element in the feed, shown in Figure 7-2.
Search WWH ::




Custom Search