Cosmos DB provides various APIs with regards to data access from various platforms. Lets have a look at the APIs available:
- Core(SQL) API: SQL API is the default API for Cosmos DB. It provides a similar functionality as a standard NoSQL data store. The main advantage of this API is that data can be accessed with a standard SQL-like language, hence the name, SQL API.
- Mongo DB API: This API provides transparent access to the data stored in Cosmos DB, which means, any existing Mongo DB client SDKs or drivers can interact with the data as if they were interacting with data stored in Mongo DB. The current version of the API is compatible with version 3.2 of the Mongo DB wire protocol.
- Cassandra API: This API support the Cassandra Query Language (CQL). It exposes the data as a partitioned row store. Like, Mongo DB API, it provides transparent access for any standard Cassandra clients and tools. The current version of this API supports version 4 of the CQL wire protocol.
- Azure Table API: Table API provides support for Azure table storage, the simplest NoSQL data store available on Azure. Azure table storage provides automatic indexing and no index management is required. It supports OData, LINQ queries and REST API.
- Gremlin API: Gremlin API exposes the data as a graph data structure, meaning data is either a vertex (individual item on the database) or an edge (relationship between items in the database). It supports Apache Tinkerpop Gremlin language.
Decision making process and business case suitability of each of the above APIs will be discussed in a future post.