Courseiva

DP-900 Practice Question: Describe considerations for working with non-relational data on Azure

A company stores user profiles as JSON documents. Each profile includes standard fields (userId, name, email) and optional fields (preferences, history). The application needs fast key lookups by userId and SQL-like queries on optional fields. Which Azure Cosmos DB API should they choose?

⚠ Common exam trap

Many exam-takers confuse the MongoDB API's support for JSON documents with the ability to run SQL queries, when in fact MongoDB uses its own query language and does not support SQL syntax, leading them to incorrectly choose MongoDB over the SQL (Core) API.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

SQL (Core) API

The SQL (Core) API is the correct choice because it natively supports JSON documents with flexible schemas, enabling fast key-value lookups on the `userId` field (via automatic indexing) and rich SQL-like querying (e.g., `SELECT * FROM c WHERE c.preferences.theme = 'dark'`) on optional fields. It is the only Azure Cosmos DB API that provides a SQL query syntax directly over JSON, making it ideal for mixed workloads of point reads and ad-hoc queries on nested or optional properties.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • SQL (Core) API

    Why this is correct

    Azure Cosmos DB SQL (Core) API is the native document model that stores JSON documents exactly as provided, preserving nested structures and supporting flexible schema evolution. It exposes a SQL-like query language that allows filtering, projection, and joins on any field within the JSON, making it ideal for both point lookups by key and ad-hoc analytical queries. This API directly satisfies the stated requirements of fast key-based access and SQL-style querying over arbitrary fields.

  • MongoDB API

    Why it's wrong here

    The MongoDB API in Azure Cosmos DB does store JSON-like documents and provides a flexible schema, so it might appear relevant at first glance. However, it uses MongoDB's query syntax based on JSON operators like $match and $lookup, not T-SQL or standard SQL, and the requirement explicitly calls for SQL-like queries. This API is the right choice only if the company were migrating existing MongoDB workloads, but for a new implementation with a SQL requirement, the SQL (Core) API is the better fit.

    When this WOULD be correct

    If the question specified that the application requires MongoDB-compatible drivers, uses MongoDB-specific features like aggregation pipelines, or needs to migrate an existing MongoDB workload to Azure Cosmos DB, then the MongoDB API would be correct.

  • Cassandra API

    Why it's wrong here

    The Cassandra API implements the Apache Cassandra wide-column data model, where data is organized into tables with rows and columns but not as nested JSON documents. It uses CQL (Cassandra Query Language), which is similar to SQL but does not support full JSON document manipulation and offers limited query flexibility beyond primary-key and indexed columns. This API is designed for high-throughput writes and key-based reads, not for querying arbitrary JSON fields, making it unsuitable for this requirement.

    When this WOULD be correct

    A company needs a globally distributed, low-latency, high-throughput database for time-series data (e.g., IoT sensor readings) with a fixed schema, requiring strong consistency and the ability to query by partition key and clustering columns using CQL.

  • Table API

    Why it's wrong here

    The Table API in Azure Cosmos DB is a key-value store that requires a fixed, flat schema composed of property-value pairs, without support for nested JSON documents. Queries are limited to equality and range operations on the partition key and row key, and it does not provide a SQL-like query syntax for arbitrary field evaluation. Therefore, it cannot handle the flexible JSON profiles with nested content or the ad-hoc query needs described in the scenario.

    When this WOULD be correct

    A company needs to store structured, non-relational data (e.g., customer records with a fixed set of properties) and requires fast point lookups by partition key and row key, with no need for complex queries or nested JSON. The Table API would be correct for such a scenario.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The DP-900 exam frequently reuses these exact scenarios with slightly different constraints.

SQL (Core) APICorrect answer

Why this is correct

Azure Cosmos DB SQL (Core) API is the native document model that stores JSON documents exactly as provided, preserving nested structures and supporting flexible schema evolution. It exposes a SQL-like query language that allows filtering, projection, and joins on any field within the JSON, making it ideal for both point lookups by key and ad-hoc analytical queries. This API directly satisfies the stated requirements of fast key-based access and SQL-style querying over arbitrary fields.

MongoDB APIWrong answer — click to see why

Why this is wrong here

The MongoDB API supports JSON documents and key lookups, but it does not natively support SQL-like queries on optional fields; it uses MongoDB query language instead.

★ When this WOULD be the correct answer

If the question specified that the application requires MongoDB-compatible drivers, uses MongoDB-specific features like aggregation pipelines, or needs to migrate an existing MongoDB workload to Azure Cosmos DB, then the MongoDB API would be correct.

Why candidates choose this

Candidates see JSON documents and think of MongoDB, which is a popular NoSQL database for JSON, but overlook that the SQL (Core) API also supports JSON and provides SQL querying.

Cassandra APIWrong answer — click to see why

Why this is wrong here

The Cassandra API uses CQL (Cassandra Query Language) and is optimized for high-throughput writes and partition-based queries, not for SQL-like queries on optional fields or flexible JSON documents. It lacks native support for querying arbitrary nested fields without predefined schema.

★ When this WOULD be the correct answer

A company needs a globally distributed, low-latency, high-throughput database for time-series data (e.g., IoT sensor readings) with a fixed schema, requiring strong consistency and the ability to query by partition key and clustering columns using CQL.

Why candidates choose this

Candidates may confuse Cassandra's wide-column store with document databases, or assume its CQL supports SQL-like queries, not realizing it lacks the flexible schema and query capabilities needed for JSON documents with optional fields.

Table APIWrong answer — click to see why

Why this is wrong here

The Table API is designed for key-value and tabular data with a fixed schema, not for JSON documents with nested optional fields. It does not support SQL-like queries on nested properties or efficient indexing of arbitrary fields.

★ When this WOULD be the correct answer

A company needs to store structured, non-relational data (e.g., customer records with a fixed set of properties) and requires fast point lookups by partition key and row key, with no need for complex queries or nested JSON. The Table API would be correct for such a scenario.

Why candidates choose this

Candidates may think the Table API is suitable because it supports schema-less data and key-based lookups, but they overlook its lack of support for nested JSON and SQL-like querying on optional fields.

Analysis generated from the official DP-900blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

About these practice questions

Courseiva writes every DP-900 question from scratch — 820 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DP-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-900 exam.