Developing with Azure Cosmos DB Table API and Azure Table storage

Azure Cosmos DB Table API and Azure Table storage share the same table data model and expose the same create, delete, update, and query operations through their SDKs.

If you currently use Azure Table Storage, you gain the following benefits by moving to the Azure Cosmos DB Table API:

Azure Table storage Azure Cosmos DB Table API
Latency Fast, but no upper bounds on latency. Single-digit millisecond latency for reads and writes, backed with <10-ms latency reads and <15-ms latency writes at the 99th percentile, at any scale, anywhere in the world.
Throughput Variable throughput model. Tables have a scalability limit of 20,000 operations/s. Highly scalable with dedicated reserved throughput per table that's backed by SLAs. Accounts have no upper limit on throughput and support >10 million operations/s per table.
Global distribution Single region with one optional readable secondary read region for high availability. You can't initiate failover. Turnkey global distribution from one to 30+ regions. Support for automatic and manual failovers at any time, anywhere in the world.
Indexing Only primary index on PartitionKey and RowKey. No secondary indexes. Automatic and complete indexing on all properties, no index management.
Query Query execution uses index for primary key, and scans otherwise. Queries can take advantage of automatic indexing on properties for fast query times.
Consistency Strong within primary region. Eventual within secondary region. Five well-defined consistency levels to trade off availability, latency, throughput, and consistency based on your application needs.
Pricing Storage-optimized. Throughput-optimized.
SLAs 99.99% availability. 99.99% availability SLA for all single region accounts and all multi-region accounts with relaxed consistency, and 99.999% read availability on all multi-region database accounts Industry-leading comprehensive SLAs on general availability.

Developing with the Azure Cosmos DB Table API

At this time, the Azure Cosmos DB Table API has four SDKs available for development:

  • Microsoft.Azure.Cosmos.Table: .NET SDK. This library targets .NET Standard and has the same classes and method signatures as the public Windows Azure Storage SDK, but also has the ability to connect to Azure Cosmos DB accounts using the Table API. Users of .NET Framework library Microsoft.Azure.CosmosDB.Table are recommended to upgrade to Microsoft.Azure.Cosmos.Table as it is in maintenance mode and will be deprecated soon.

  • Python SDK: The new Azure Cosmos DB Python SDK is the only SDK that supports Azure Table storage in Python. This SDK connects with both Azure Table storage and Azure Cosmos DB Table API.

  • Java SDK: This Azure Storage SDK has the ability to connect to Azure Cosmos DB accounts using the Table API.

  • Node.js SDK: This Azure Storage SDK has the ability to connect to Azure Cosmos DB accounts using the Table API.

Additional information about working with the Table API is available in the FAQ: Develop with the Table API article.

Developing with Azure Table storage

Azure Table storage has these SDKs available for development: