Getting to know Cosmos DB
There are many different NoSQL databases. They all have their own special characteristics. Microsoft offers Azure Cosmos DB as their flagship NoSQL cloud database. Cosmos DB allows us to use different APIs to connect to Cosmos DB. This is to facilitate migration from different on-premises NoSQL databases to Azure. Before we go into other types of databases, we will discuss Cosmos DB's native type. Cosmos DB is a document database.
MongoDB is the best-known open source document database. One of the APIs that Cosmos DB supports is the MongoDB API. This means that applications can write code to Cosmos DB as if it were a MongoDB. However, be aware that Cosmos DB only mimics the API from MongoDB. It actually has a different logical structure underneath that you need to be aware of.
Cosmos DB also has a SQL API. This means that we can write SELECT
statements to query Cosmos DB databases.
Document databases store data as JSON documents. Document databases...