Data Management Using OData

    Open Data Protocol ( OData ) is an open web protocol for requesting and updating data. The protocol allows you to perform operations with resources using HTTP commands as requests and exchange data in JSON or XML formats.

    OData is one of the best standards for creating a RESTful API.

    You can request data using simple HTTP requests, for example:
    https://samples.databoom.space/api1/sampledb/collections/persons?$filter=firstname eq 'Lamar'
    Find all people by the name of Lamar.

    OData allows you to set a huge number of parameters that allow you to generate very 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 that meet the following condition : the president of the publishing house in which the book is published loves the books of a certain author with the name “Georgie”. The result of the request must be sorted by name, to give out the first 10 books.

    The OData query language is comparable in power to SQL.



    Basic OData Features


    • Simple data reading (queries without parameters)
      • Getting a collection of objects
      • Getting a single object
      • Getting a single property
      • Getting objects from relationships. For example, getting a list of friends of friends.

    • Parameterized queries (search, sorting, etc.)
      • Search by criteria (“less”, “more”, etc.), the ability to build complex conditions using logical expressions.
      • Search by links (by related objects)
      • Sort by any set of fields
      • Obtaining complex complex objects, for example, receiving data about a person along with his phones and a list of friends
      • Paging

    • Adding Data
      • Adding simple objects
      • Adding feature collections
      • Adding compound objects (along with nested objects)

    • Data modification
      • Modification of individual properties (fields)
      • Replacing an entire object with a new one

    • Data Deletion
      • Delete objects
      • Delete collections
      • Removing individual properties (fields)

    • Adding, modifying, and deleting relationships between objects


    Libraries for working with OData


    Currently, there are a large number of libraries that support the OData protocol, and new ones appear every day.
    In particular, such JavaScript libraries as Kendo UI , DevExtreme Web , Syncfusion HTML5 controls , Infragistics HTML5 controls , OpenUI5 , Wijmo , JayData , Breeze.js , datajs , ODataJS , angular-odata , etc. work with OData . There are also libraries for Java, .NET, C ++, Python, Objective-C, etc.

    Many of these libraries greatly simplify the development of complex applications thanks to the OData standard. For example, it’s enough for the control to specify the URL to the OData server and he will do the rest: paging, sorting, adding, modifying, deleting records, filtering data, grouping, etc.

    NitrosBase.js - ready OData server


    NitrosBase.js is a ready-to-use OData server. It makes it possible to create a database, add arbitrary JSON objects without a description of the data scheme, and make OData queries to receive and modify data.

    The classic use case for NitrosBase.js is the rapid development of prototypes of applications working with an OData server. When developing a prototype, you can simply put the necessary controls on the form, and they immediately work without creating server codes. If you add, delete fields in JavaScript objects, modify the relationships between objects, you do not have to change the database schema and modify server codes. At the same time, it allows you to fulfill requests of any complexity.

    By developing a live application prototype, you get the full specification of your API and an established data schema. Now you can start developing the server or leave NitrosBase.js

    NitrosBase.js is our new project ( http://databoom.space ) and we would like to hear community recommendations on improving and developing the project.

    Also popular now: