Microsoft Certified: Azure Developer Associate (AZ-204)Develop for Azure storageHard

A manufacturing plant uses an IoT solution to collect telemetry data from thousands of sensors. This data is time-series in nature, arriving as small JSON payloads. The solution needs to store this data efficiently, enable fast queries based on time ranges, and support schema evolution without downtime. Which Azure Cosmos DB API is best suited for this scenario?

  1. AMongoDB API
  2. BCore (SQL) API
  3. CCassandra API
  4. DGremlin API
Show answer & explanation

Correct answer: B. Core (SQL) API

The Core (SQL) API is highly optimized for JSON documents, offering flexible schema and robust indexing for time-series data. Its native support for JSON and powerful query language (SQL-like) make it ideal for efficient storage, time-range queries, and schema evolution, especially when combined with a good partition key strategy.

Why the other options are wrong

  • A. MongoDB API is a good choice for existing MongoDB applications, but Core (SQL) API offers potentially better native integration and performance for new Cosmos DB solutions.
  • C. Cassandra API is suitable for existing Cassandra workloads requiring high throughput and availability but may not be as optimized for flexible JSON documents and time-series queries as the SQL API.
  • D. Gremlin API is for graph databases and is not suitable for time-series telemetry data.

Cosmos DB Core (SQL) API

The native API for Azure Cosmos DB, designed for storing and querying JSON documents using a SQL-like query language.

  • Optimized for JSON documents.
  • Flexible schema and robust indexing.
  • Supports rich SQL queries.
  • Good for time-series, IoT, and general-purpose NoSQL.

Memory trick: For IoT data, the Core (SQL) API is the 'Core' choice for flexible, fast JSON.

More Develop for Azure storage questions