Skip to content
datastudyguides

DP-900 · 3 Describe considerations for working with non-relational data on Azure

Cosmos DB APIs

Exam objective: Describe Azure Cosmos DB APIs

Azure Cosmos DB offers five APIs, NoSQL, MongoDB, Table, Cassandra and Gremlin, so an application can keep a familiar query language while gaining Cosmos DB scale.

When you create an Azure Cosmos DB account, you choose one of five APIs, and that choice decides the data format, the query language and the client libraries the application uses. Cosmos DB stores the data internally in its own way, and each API is simply a familiar layer on top of it.

API Data model Query style
NoSQL JSON documents SQL like
MongoDB BSON documents MongoDB Query Language
Table Key value rows Partition key and row key
Cassandra Column family tables CQL
Gremlin Graph, vertices and edges Gremlin traversals

NoSQL is the native API, and it is the recommended choice for a new application with no existing codebase to carry over. The other four APIs exist mainly for portability: an application already built on MongoDB, Table storage or Cassandra can point at Cosmos DB with little rewriting, and Gremlin fits data where the relationships, such as a social graph, matter as much as the records themselves.

On the exam, match the API name to its data model: documents, key value, column family or graph.

Key points

  • Cosmos DB for NoSQL is the native API: it stores JSON documents and is queried with SQL like syntax, and it is the recommended choice for a new application.
  • Cosmos DB for MongoDB stores data as BSON documents and accepts the MongoDB Query Language, so an existing MongoDB application needs little code change.
  • Cosmos DB for Table uses the same partition key and row key model as Azure Table storage, but adds global distribution and automatic secondary indexes.
  • Cosmos DB for Apache Cassandra accepts CQL over column family tables, where rows do not all have to share the same columns.
  • Cosmos DB for Apache Gremlin stores graph data as vertices and edges, for scenarios such as social networks or recommendation engines, and is queried with Gremlin traversals.

Exam trap

The API is a property of the whole account, chosen when the account is created, not a setting you pick per query. Each API has its own query language, so NoSQL syntax will not run against a Table or Gremlin API account.

Check yourself

An existing application already uses Azure Table storage and needs more scale and global distribution without a full rewrite. Which Cosmos DB API fits best?

Go deeper on Microsoft Learn

Checked against Microsoft Learn on October 1, 2026.

How well do you know this?