You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Azure Cosmos DB is unique among databases in offering multiple wire-protocol-compatible APIs and five tuneable consistency levels. This lesson explores each API, when to use it, and how consistency levels let you make precise trade-offs between performance, availability, and data freshness.
When you create a Cosmos DB account, you choose an API. This choice is permanent — it cannot be changed after account creation.
The NoSQL API (formerly called the SQL API or Core API) is Cosmos DB's native API. It stores data as JSON documents and uses a SQL-like query language:
SELECT c.name, c.email
FROM customers c
WHERE c.city = 'London'
ORDER BY c.name
| Feature | Detail |
|---|---|
| Data format | JSON documents |
| Query language | SQL-like syntax with extensions |
| SDK support | .NET, Java, Python, Node.js, Go |
| Best for | New applications, general purpose |
| Unique features | Change feed, stored procedures, UDFs, triggers |
The NoSQL API offers the broadest feature set and is the recommended choice for new applications.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.