Data management using OData protocol

Open Data Protocol (OData) is open Web protocol for querying and updating data. The protocol allows for the performing of operations on resources, requesting them via HTTP commands, and exchanging data in JSON or XML. OData is one of the best standards to create a RESTful API.

You can query the data using simple HTTP requests. For example:
https://samples.databoom.space/api1/sampledb/collections/persons?$filter=firstname eq ‘Lamar’ Find all people having first name Lamar

OData allows for the setting of a very large number of parameters, which allows one to form highly complex queries to the data source. For example:
https://samples.databoom.space/api1/sampledb/collections/books?$filter=publisher/president/likes/author/firstname eq ‘Georgie’&$top=10&$orderby=title Select all books satisfying the following condition: The president of the publisher that publicized the selected book likes the books of author named “Georgie”. The result should be sorted by the book titles, and the first 10 books should be displayed.

OData query language is comparable in power to SQL.

BASIC ODATA FEATURES

  • Simple reading of data (queries w/o parameters)
    • Obtaining the object collection
    • Obtaining a single object
    • Obtaining an individual property
    • Obtaining the objects by relations. For example, obtaining the list of friends of friends.
  • Parameterized queries (search, sorting, etc.)
    • Search by criteria (“less”, “greater”, etc.), thus creating the possibility of constructing complex conditions using logical expressions
    • Search collections referenced by navigation properties.
    • Sorting by any set of fields
    • Obtaining JSON nested objects and arrays. For example, getting a person’s data along with his phone’s contacts and friend’s list.
    • Paging
  • Data creation
    • Creation of simple objects
    • Creation of object collections
    • Creation of composite objects (along with the nested objects)
  • Data updating
    • Updating individual properties (fields)
    • Replacing the entire object to the new object.
  • Data deletion
    • Deletion of objects
    • Deletion of collections
    • Deletion of individual properties (fields)
  • Adding, modifying, and deletion of the links between objects

ODATA LIBRARIES

Currently, there are large numbers of libraries that support OData protocol, and every day new libraries arise. Specifically, the following popular JavaScript libraries can consume Odata services: Kendo UI, DevExtreme Web, Syncfusion HTML5 controls, Infragistics HTML5 controls, OpenUI5, Wijmo, JayData,Breeze.js, datajs, ODataJS, angular-odata, etc. There are also libraries for Java, .NET, C++, Python, Objective-C, etc.

These libraries greatly simplify the development of complex applications thanks to OData standard. For example, it is sufficient to set grid’s URL property to some OData collection, and the rest of the work the grid will make itself: paging, sorting, adding-modifying-deleting the records, data filtering, grouping, etc.

DATABOOM IS A READY-TO-USE ODATA SERVER.

databoom is OData server ready for use. It enables creating a database and adding any JSON objects, running OData queries for getting or modifying data without the need to describe database schema.

The regular-use case for databoom is the prototyping of applications that communicate with OData servers. When developing a prototype, you can simply put the necessary controls on the form, and they begin functioning immediately without any need to create server code. You can create/delete fields in JavaScript objects or modify relationships between objects and save modifications to databoom without need to change the database schema or modify server-side code. You can also run queries of any complexity.

Having developed a live application prototype, you get a complete specification of your API and a firmly established database schema. Now you can start developing your own server or keep relying on databoom.

databoom is our new project (http://databoom.space) and we’d love to hear community recommendations for the improvement and development of the project.

Leave a comment