🔒 Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided DP-900 Domain 3
Domain 3 — Module 4 of 5 80%
18 of 27 overall

DP-900 Study Guide

Domain 1: Core Data Concepts

  • Your First Look at Data Free
  • Data File Formats: CSV, JSON, Parquet & More Free
  • Databases: Relational vs Non-Relational Free
  • Transactional Workloads: Keeping Data Consistent Free
  • Analytical Workloads: Finding the Insights Free
  • Data Roles: DBA, Engineer & Analyst Free
  • The Azure Data Landscape Free

Domain 2: Relational Data on Azure

  • Relational Data: Tables, Keys & Relationships
  • Normalization: Why Duplicate Data is Bad
  • SQL Basics: SELECT, INSERT, UPDATE, DELETE
  • Database Objects: Views, Indexes & More
  • Azure SQL: Your Database in the Cloud
  • Open-Source Databases on Azure
  • Choosing the Right Azure Database

Domain 3: Non-Relational Data on Azure

  • Azure Blob Storage: Files in the Cloud
  • Azure Files & Table Storage
  • Azure Cosmos DB: The Global Database
  • Cosmos DB APIs: SQL, MongoDB & More
  • Choosing Non-Relational Storage

Domain 4: Analytics on Azure

  • Data Ingestion & Processing
  • Analytical Data Stores: Data Lakes, Warehouses & Lakehouses
  • Microsoft Fabric & Azure Databricks
  • Batch vs Streaming: Two Speeds of Data
  • Real-Time Analytics on Azure
  • Power BI: See Your Data
  • Data Models in Power BI
  • Choosing the Right Visualization

DP-900 Study Guide

Domain 1: Core Data Concepts

  • Your First Look at Data Free
  • Data File Formats: CSV, JSON, Parquet & More Free
  • Databases: Relational vs Non-Relational Free
  • Transactional Workloads: Keeping Data Consistent Free
  • Analytical Workloads: Finding the Insights Free
  • Data Roles: DBA, Engineer & Analyst Free
  • The Azure Data Landscape Free

Domain 2: Relational Data on Azure

  • Relational Data: Tables, Keys & Relationships
  • Normalization: Why Duplicate Data is Bad
  • SQL Basics: SELECT, INSERT, UPDATE, DELETE
  • Database Objects: Views, Indexes & More
  • Azure SQL: Your Database in the Cloud
  • Open-Source Databases on Azure
  • Choosing the Right Azure Database

Domain 3: Non-Relational Data on Azure

  • Azure Blob Storage: Files in the Cloud
  • Azure Files & Table Storage
  • Azure Cosmos DB: The Global Database
  • Cosmos DB APIs: SQL, MongoDB & More
  • Choosing Non-Relational Storage

Domain 4: Analytics on Azure

  • Data Ingestion & Processing
  • Analytical Data Stores: Data Lakes, Warehouses & Lakehouses
  • Microsoft Fabric & Azure Databricks
  • Batch vs Streaming: Two Speeds of Data
  • Real-Time Analytics on Azure
  • Power BI: See Your Data
  • Data Models in Power BI
  • Choosing the Right Visualization
Domain 3: Non-Relational Data on Azure Premium ⏱ ~10 min read

Cosmos DB APIs: SQL, MongoDB & More

Cosmos DB isn't one database — it's a platform that speaks multiple languages. Choose the API that matches your data model and developer skills.

One engine, multiple APIs

☕ Simple explanation

Cosmos DB is like a restaurant that serves multiple cuisines.

The kitchen (engine) is the same, but you can order from different menus: Italian (SQL API), Japanese (MongoDB), Indian (Gremlin graph), or Chinese (Table). Each menu offers different dishes (data models), but they all come from the same high-quality kitchen.

You choose the API (menu) that matches what your application already expects.

Azure Cosmos DB uses a single underlying storage and indexing engine but exposes multiple APIs that map to different NoSQL data models and wire protocols. This allows developers to use familiar tools, drivers, and query languages while benefiting from Cosmos DB’s global distribution, low latency, and elastic scaling. Each API optimises for a specific data model: documents, key-value pairs, column families, or graphs.

The Cosmos DB APIs

API for NoSQL (formerly SQL API)

The default and most popular Cosmos DB API. Stores data as JSON documents and queries them using a SQL-like syntax.

SELECT c.name, c.email
FROM customers c
WHERE c.city = 'Auckland'

Best for: New applications, flexible document storage, developers who know SQL. Data model: JSON documents.

API for MongoDB

Uses the MongoDB wire protocol — existing MongoDB applications can connect to Cosmos DB with minimal code changes.

Best for: Migrating existing MongoDB apps to a fully managed, globally distributed service. Data model: BSON documents (MongoDB’s binary JSON).

API for Apache Cassandra

Compatible with the Apache Cassandra wire protocol. Supports CQL (Cassandra Query Language).

Best for: Migrating Cassandra workloads, wide-column data (IoT, time-series). Data model: Column-family (wide-column).

API for Table

Compatible with Azure Table Storage — but with Cosmos DB’s performance and global distribution.

Best for: Migrating from Azure Table Storage when you need better performance, global distribution, or automatic indexing. Data model: Key-value entities with flexible properties.

API for Apache Gremlin

Supports the Apache Gremlin graph traversal language for graph databases.

Best for: Social networks, recommendation engines, fraud detection — any data with complex relationships between entities. Data model: Nodes (entities) and edges (relationships) — graph.

Cosmos DB APIs compared
FeatureNoSQL (SQL)MongoDBCassandraTableGremlin
Data modelDocuments (JSON)Documents (BSON)Column-familyKey-valueGraph
Query languageSQL-likeMQLCQLOData/RESTGremlin
Best forNew appsMongoDB migrationCassandra migrationTable Storage upgradeConnected data
Most popular?Yes (default)Second mostNicheNicheNiche
ℹ️ How to choose an API

Simple decision tree:

  1. Building a new app? → API for NoSQL (most flexible, SQL-like queries)
  2. Migrating a MongoDB app? → API for MongoDB
  3. Migrating a Cassandra app? → API for Apache Cassandra
  4. Need graph traversal (social networks, recommendations)? → API for Gremlin
  5. Upgrading from Azure Table Storage? → API for Table

Important: Once you create a Cosmos DB account with a specific API, all databases in that account use that API. You can’t mix APIs within one account.

💡 Exam tip: API matching

The exam gives you a scenario and asks which Cosmos DB API to use:

  • “New application storing JSON documents” → NoSQL (SQL API)
  • “Existing MongoDB application moving to Azure” → MongoDB API
  • “Social network with users connected by friendships” → Gremlin API
  • “Wide-column data from IoT sensors” → Cassandra API
  • “Upgrading from Azure Table Storage” → Table API

The default choice for new applications is always NoSQL (SQL API) unless the scenario specifically mentions a different database technology.

Flashcards

Question

What are the five Cosmos DB APIs?

Click or press Enter to reveal answer

Answer

1. NoSQL (SQL-like queries on JSON documents — the default). 2. MongoDB (MongoDB wire protocol). 3. Apache Cassandra (wide-column). 4. Table (Azure Table Storage compatible). 5. Apache Gremlin (graph).

Click to flip back

Question

Which Cosmos DB API should you choose for a new application with no existing database?

Click or press Enter to reveal answer

Answer

API for NoSQL (formerly SQL API) — it's the default, most popular, and most flexible. It stores JSON documents and uses a familiar SQL-like query syntax.

Click to flip back

Question

When would you choose the Gremlin API for Cosmos DB?

Click or press Enter to reveal answer

Answer

When your data has complex relationships between entities — social networks, recommendation engines, fraud detection. The Gremlin API stores data as nodes (entities) and edges (relationships) in a graph.

Click to flip back

Knowledge check

Knowledge Check

Aisha's university project involves analysing student collaboration patterns — who works with whom, which project groups overlap, and who the most connected students are. Which Cosmos DB API should she use?

Knowledge Check

A company is migrating their existing MongoDB application to Azure. They want to keep using MongoDB drivers and queries. Which Cosmos DB API provides the smoothest migration?

🎬 Video coming soon

Next up: Choosing Non-Relational Storage — a decision guide for all non-relational Azure services.

← Previous

Azure Cosmos DB: The Global Database

Next →

Choosing Non-Relational Storage

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.