After a short blog post on the technical overview of Azure Cosmos DB, we will put some light on what we mean when we say that Cosmos DB is a NoSQL database and that how has it evolved over time, in this article.
Azure Cosmos DB is Microsoft’s NoSQL database platform running on the cloud. A NoSQL database, in simple terms, is a distributed database that maintains replicas of the databases and provides it as an output to a no. of users. NoSQL databases have a variety of features like scale-out, no schema management etc. We will understand each one of these further. Another important thing is that NoSQL, unlike the name suggests, doesn’t mean that there is no us of SQL. In fact, it uses SQL to query the NoSQL databases.
One of the important features of NoSQL is horizontal partitioning that we do to scale out the throughput, and that is how Azure Cosmos DB manages the growth of huge data by server-side horizontal partitioning. Once the throughput required i.e. the units of information or processes that will pass through the system, is specified to Cosmos DB, it creates that no. of replicas and gives the performance
Among many other features of Cosmos DB, which is an evolution of DocumentDB, Microsoft’s NoSQL database that supports schema-free JSON documents, the best one is that it has multiple APIs that extend support to different data models like Tables, graphs, documents etc. This was not the same case with Document DB as it used to support only the document data models. Being schema-free doesn’t mean that there is no schema at all, but means that there is no schema management required.
Cosmos DB has multiple APIs (application programming interface) and supports multiple data models. We use different APIs to work with different data models depending on the type of structure that we want our data to be in. Document DB is used to support only JSON documents which is now known as the SQL API in Cosmos DB. For BSON (JSON documents with support for binary data) documents, Cosmos Db has a MongoDB compatible API which is called MongoDB API. To support the graph-based data models, Cosmos DB has Gremlin API, key-value databases using the Table API, and the columnar databases using the Cassandra API.
Another feature of Cosmos DB, i.e. the global distribution feature of Cosmos DB makes it accessible anywhere across the globe by replication on simply a click and mapping it on to the location where it was pointed to.
With the support for different data models, Cosmos Db is spreading all across and for you to try your stint with Cosmos DB, here are some steps to follow to get started with Azure Cosmos DB.
Step 1. Create or log in to your Microsoft account and set up your details. https://signup.live.com/
Step 2. Now that you have your Microsoft account ready, grab your Azure subscription at azure.microsoft.com
Step 3. You are good to go!
Azure Cosmos DB is very friendly, so in case, you don’t want to create a Microsoft account or an Azure subscription, there is a local emulator that can be downloaded and used without the need of a network connection. Emulator will help us run the Cosmos DB service just like any other service, but the only thing that would not be supported by the emulator would be global distribution.
We will talk more about what and how Emulator helps us work with Cosmos DB without the need of creating a Microsoft Azure account, in the next blog post.