I'm working on a project where I need to expose Odata endpoints to the clients, and we are using CosmosDB for our database. Most of the documents I found on implementing Odata with Cosmos DB actually use in-memory data store; so the query filtering/paging is not done directly at Cosmos DB which is not very efficient I believe. (Example)

Also I wonder how think like $expand, which allows to specify related entities (navigational objects...) to be loaded inline, can be implemented with Odata (since Cosmos DB doesn't support cross-document join).

So does anyone have experience using Odata with non-relational database, does it worth implementing Odata in this scenario, or these two technologies simply just don't really go together?

  • 2
    I do not know anything about CosmosDB, but if your application really needs those joins, then probably you have chosen the wrong db? And if application(s) do not need joined data, then why bother - provide ids. You can probably also make some batching and have several queries for expands (on a limited number of ids) - depends a lot on what you are doing though. – Roman Susi Jan 24 at 7:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.