Using the appropriate API for each data model

Under the hood, Cosmos DB internally stores data in a format called Atom-Record-Sequence (ARS), which is highly optimized for partitioning and replication. Hence, no matter the NoSQL data type and API, the data ends up stored in this internal format.

Cosmos DB provides support for five different APIs with SDKs for many programming languages and platforms. Based on the data model we use with our database, we must use a specific API to interact with the Cosmos DB database service. The following table summarizes the five APIs that are available based on the four data models:

NoSQL database type

Available APIs

Key/value

Table API

Column, wide-column, or column-family

Cassandra API ...

Get Guide to NoSQL with Azure Cosmos DB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.