Choose The Appropriate API For Azure Cosmos DB

Introduction

  • Azure Cosmos DB offers multiple database APIs, which include the Core (SQL) API, API for MongoDB, Cassandra API, Gremlin API, and Table API.
  • These APIs allow your applications to treat Azure Cosmos DB as if it were various other databases technologies.
  • Confusion comes when it’s time to choose the API for Azure Cosmos DB, but in reality, there is no one best API, and you may choose any one of the APIs to build your application.
  • Below information will help you to understand available Cosmos DB APIs and when to use what.

Azure Cosmos DB APIs

Core (SQL) API

Provides the flexibility of a NoSQL document store combined with the power of SQL for querying.

MongoDB API

Supports the MongoDB wire protocol so that existing MongoDB client continue to work with Azure Cosmos DB as if they are running against an actual MongoDB database.

Cassandra API

Supports the Cassandra wire protocol so that existing Apache drivers compliant with CQLv4 continue to work with Azure Cosmos DB as if they are running against an actual Cassandra database.

Gremlin API

Supports graph data with Apache TinkerPop (a graph computing framework) and the Gremlin query language.

Table API

Provides premium capabilities for applications written for Azure Table storage.

Choose the appropriate API for Azure Cosmos DB