To follow along with this article, select SQL. Select the API from the list of APIs which will govern the data model you want to use. You will need to provide a globally unique name in the ID field below, which will be used as endpoint address for the Cosmos DB account. Once you log in to your account, click on Create a resource, and then you will see Azure Cosmos DB under Databases. To begin developing and deploying Azure Cosmos DB applications, you need to create an account on Azure portal. Creating an Azure Cosmos DB Database on the Azure Portal In this article we will be mostly using SQL API. The main features of Cosmos DB such as partitioning, global distribution, durability and high scalability will remain the same across all APIs. All these API look different structurally, but they all share the same capabilities of Cosmos DB. The selection of API is entirely up to you it depends on what type of data you want to store and in what fashion you want to store it. You will have to provide schema upfront to be able to store the data. The data is physically stored in column-oriented fashion. Cassandra API: This API is based on Columnar data storage feature.It promotes the data to be modeled using graphs and for accessing the data cross many relationships efficiently you will have to use graph traversal language.
Gremlin API: Where there is a need to annotate data with meaningful relationships, Gremlin API can be used.In this data model, the entities are stored as a key-value pairs. Table API: This API is basically an evolution to Azure Table Storage.It is similar to JSON but it has more features and it extends the JSON model with additional data types and multi-language support. MongoDB API: It mainly works with MongoDB’s binary version of JSON called as BSON.SQL API: It mainly treats entities as JSON (JavaScript Object Notation) documents and these are hierarchical JavaScript Object Notation documents.Data can be modelled as document and there are 2 different APIs for doing this:.Here are APIs with supported SDKs available in various languages: Multi-model and Multi-API database – Cosmos DB is based on the atom-record-sequence data model which supports multiple data model such as documents, tables, graphs, key-value pairs, etc.High scalability- Horizontal partitioning makes Cosmos DB more scalable and durable for big amounts of data.
Turnkey global distribution- Replication of data across different Azure regions which ensures availability and low-latency.It provides multiple APIs that support efficient access to the multiple data models such as tables, graph and columnar.
What is Azure Cosmos DB?Īccording to Microsoft’s Azure Documentation, Cosmos DB is “Microsoft’s globally distributed, multi-model database.” It offers geo-replication of the data and virtually unlimited scale storage. NoSQL databases support the concept of replication which ensures the data is accessible and available to the consumer as the replicas are kept in different parts of world making it quick to access. NoSQL provides solutions to all these problems. When dealing with a huge amount of data, you need latency and high throughput. NoSQL provides features such as horizontal partitioning that aids scaling out. When there is a need to store large amounts of data, the traditional relational databases must be scaled-out. NoSQL databases are the type of databases which stores and retrieves data in a different way as compared to traditional relational databases. In fact, you will use some SQL commands to query NoSQL databases. When you begin learning about Cosmos DB and NoSQL databases, the first questions you should ask are what is a NoSQL database and what is the problem that No SQL databases address? Just to clarify, NoSQL does not necessarily mean that you are not going to use SQL on Cosmos DB. Introduction to Azure Cosmos DB Emulator for Creating Applications - Simple Talk Skip to content