Azure Cosmos DB is a globally distributed, multi-model database service designed for low-latency, elastic scale, and high availability. The core concepts that drive performance and cost are the resource model (accounts → databases → containers → items), partitioning, and throughput (RU/s). This cheat sheet focuses on the API for NoSQL (SQL query language) and the operational features you'll use most: indexing, consistency, search, change feed, backup/restore, and security. Full-text search and hybrid search reached general availability in 2025, making Cosmos DB a search-native database alongside its vector and transactional capabilities.
What This Cheat Sheet Covers
This topic spans 16 focused tables and 149 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Resource Model
| Resource | Example | Description |
|---|---|---|
https://<account>.documents.azure.com:443/ | Top-level Azure resource that provides the endpoint, authentication boundary, and global distribution settings for all databases/containers/items underneath. | |
databaseId = "Sales" | • Logical namespace under an account that groups one or more containers • throughput can be provisioned at database (shared) or container (dedicated) scope. | |
containerId = "Orders" | • Unit of scalability for items, indexing, and throughput • partition key is defined at creation and is immutable in-place. | |
{ "id": "o-123", "customerId": "c-9" } | • JSON document stored in a container • uniquely identified by the composite of (partitionKey, id) for the API for NoSQL. |