Introduction to OData

ODATA enables the creation of RESTful based data services that allow resources identified using URL and defined in a data model to be published and edited by web clients using HTTP messages.

OData is the web-based equivalent of ODBC, OLEDB, ADO.NET and JDBC.

As more data-oriented web APIs come online, each team responsible for the design of each web API is confronted by the same kinds of questions, and each team answers these in their own particular way

Increasingly, “RESTful” is a design goal of web APIs. Great…but what does that mean?

How do you expose the data, the relationships between the entities inside the model, and what should the querying syntax look like?

Unfortunately, there are as many answers to these questions as there are RESTful web APIs.

Below is diagram of various OData Producers and Consumers.

!(/images/venknar/introduction-odata/a32f34a8-OData_20Org.png)

OData is built on top of ATOM. ATOM is simple way of exposing ‘feed’ of data, each distinct piece of which is called ‘entry’. Atom originated in a world of bloggers to keep the readers upto date.

At the core of OData are feeds, which are Collections of typed Entries.

Each entry represents a structured record with a key that has a list of Properties of primitive or complex types. Entries can be part of a type hierarchy and may have related entries and related feeds through Links.

Every OData service expose Service Document and Service Meta Document. A Service Document lists all the top-level feeds so clients can discover them and find out the addresses of each of them. The service document is available at the Service Root URI and may be formatted in ATOM or JSON. A Service Meta Document describes the data model (i.e.structure and organization of all the resources) exposed as HTTP endpoints by the service. fadfa

OData provides the following benefits:

1. Simple and Uniform way of sharing data at the protocol level.

2. Enables broad integration across products and breaks data silos.

3. All you need is Http stack to integrate with any OData producer.

A simple, uniform way of sharing data at the protocol level, and in a way that truly enables the lowest possible bar of entry, is key to enable broad integration across products and break data silos that form around applications.

More details on OData at: www.odata.org and

This article is part of the GWB Archives. Original Author: venknar

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.