Understanding the Azure Cosmos Db
Microsoft recently introduced, Azure Cosmos Db accounts in their Build 2017. Who doesn't like a successful Build, and personally saying there were so many excellent announcements made at Build, that it has been intriguing almost everyone to know more about the products Microsoft is offering now. Among them is the Azure Cosmos Db. So, in this post I will give a million-feet overview, that you can read in under 5 minutes to fully understand what Azure Cosmos Db is all about.
SLAs are pretty much straight-forward.
I personally tried them out, however the time it took was annoying for me, but understandable.
If you already have an account for any model, you can migrate that to Cosmos Db.
You can also try out the templates, Microsoft provides a template database, plus a software application that you can run and try to see how it works. I tried this.
Also have a look at the pricing model, plus the SLAs offered by Microsoft.
What is Azure Cosmos Db
First thing to understand is that, Azure Cosmos Db is a wrapper around all the models that developers are using currently. Following are only a few of the models implemented by developers all across the globe,
- Relational models -- the SQL databases.
- NoSQL models -- Azure already has a NoSQL model, DocumentDB.
- Key-value pairs -- Typically apart from NoSQL, Key-value pairs are highly used for data interchanging; such as in JSON documents.
- Graph etc -- Gremlin was mentioned to be existing. However, I personally believe Microsoft will be integrating more services for Graph based data storage and interchange.
Figure 1: Azure Cosmos Db span. Image from Azure Cosmos Db docs.
Likewise, the API models that it supports depends on the database model used, and the APIs that are provided at the time.
Microsoft Azure has been known for supporting multi-programming-language APIs, unlike the competition, who support only a few — and most of them rule out .NET for no fair reason at all.
However, in the case here, Azure Cosmos Db support the best possible solution for each of the model here. There are several benefits for this,
- You continue to use what you were using!
- For example, you can use .NET with your SQL databases, Node.js with mongoDB and so on.
I will write about the programming part of this service in a later post, on CodeProject and C# Corner soon.
Until then, you may wish to get started from Azure Cosmos DB Documentation.
Choosing Azure Cosmos Db
While the selection of Cosmos Db for your own projects, is all your own decision to be made. I will share a few of my experiences that I have had previously while trying it out. Note that, I just tried the service, I didn't build anything to try it out for my project.
- Azure Cosmos Db is an account, that you can use for a data source; you can select an API to create the backend for.
- Configurations and support is provided for the API that you select.
- You can create a database that conforms to that API
- You cannot create Key-value pairs in DocumentDB based template. Hack might be possible to write the data from table to NoSQL.
- So, you should do all the homework before selecting this API.
Finally, it all boils down to managing the database model perfectly. It is your own duty to decide what you want to build, how you want to build and then create an account for that under Cosmos Db and get benefits such as planet-scale, multi-model database services.