Azure Cosmos DB is Microsoft’s globally-distributed, multi-model database service "for managing data at planet-scale." It builds upon and extends the earlier Azure DocumentDB, which was released in 2014.It is schema-less and generally classified as a NoSQL database.
In this article I am going to create an Azure Cosmos DB using SQL. In the case if you want to read my two details article than please check
Let me briefly summarize before I proceeed:
- Global Distribution
Established globally distributed database system driven by the cloud-computing power of Azure. Data can be automatically replicated in Azure data centers around the world.
Or in other words, you can distribute your data to any number of Azure regions, with the click of a button. This enables you to put your data where your users are, ensuring the lowest possible latency to your customers.
- Scalability
Customers can independently scale storage and throughput. Easily scale database throughput at a per second granularity, and change it anytime you want. Scale storage size transparently and automatically to handle your size requirements now and forever. - Highly Responsive
Cosmos DB guarantees end-to-end latency of reads under 10 ms and indexed writes under 15 ms at the 99th percentile, within the same Azure region. The median latencies are significantly lower (under 5 ms). - Multiple Data Models
Customers can use key-value, graph, and document data without worrying about schema or index management. The atom-record-sequence (ARS) based data model that Azure Cosmos DB is built on natively supports multiple data models, including but not limited to document, graph, key-value, table, and columnar data models.
APIs for the following data models are supported with SDKs available in multiple languages,
- DocumentDB API (This API will be used in the article)
- MongoDB API
- Table API
- Graph (Gremlin) API
- Five consistency levels
Defined consistency levels include strong, bounded staleness, consistent-prefix, session, and eventual. - Latency
Guaranteed less than 10-ms latencies on reads and less than 15-ms latencies on (indexed) writes at the 99th percentile. - Reliability
Offered service level agreements (SLAs) include 99.99% high availability, with latency at the 99th percentile.
In Cosmos DB, SLA guarantee is very high, 99.9% for the following.
- Availability assurance 99.9%
- Throughput guarantee 99.9%
- Latency guarantee 99.9% (99% is latency less than 10 ms)
- Consistency assurance 100% of read requests guarantee consistency of the required consistency level
Let start Hello Cosmos DB using DocumentDB API (SQL)
- Creating Cosmos DB on Azure Portal
Open " https://portal.azure.com " in your browser. Select "New" from the side menu. Click “New”, then select “Databases”, and then click on “Azure CosmosDB”. Fill in all the entries like id, API (That is the important part. Here, we are going to use Key-Value) , subscription, resource group, location, and then click “Create”.
This completes the Cosmos DB (DocumentDB data model) of the database account "dutechsql".









Join the conversation! Your thoughts help the community grow.