Courseiva

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

A social media application stores user profiles as JSON documents. Each profile has standard fields like userId, name, and email, but also optional fields such as education and work history. The application needs to query profiles by userId with low latency and also run SQL-like queries to find all profiles with a specific work history value. Which Azure Cosmos DB API should they choose?

⚠ Common exam trap

Many candidates choose the MongoDB API because they associate JSON documents with MongoDB, but the question explicitly requires SQL-like queries, which is a native feature of the Core API and not MongoDB's query syntax.

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 querying JSON documents with SQL-like syntax, enabling both low-latency point reads by userId and complex queries on nested fields like work history. It provides automatic indexing of all JSON properties, which ensures efficient execution of queries across optional fields without requiring schema management.

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 a document model that natively stores JSON documents and exposes a SQL-enabled query language specifically designed to query those documents. It automatically indexes every property within the JSON, allowing flexible queries on optional and nested fields, which is ideal for a social media app's user profiles that vary in structure. Because it supports SQL-like syntax that can filter on userId and any other key with minimal effort, it best matches the requirement for querying JSON profiles.

  • MongoDB API

    Why it's wrong here

    The MongoDB API emulates the MongoDB wire protocol and query semantics, so applications must use MongoDB driver commands and MongoDB's query language, which is built around JSON operators like $match, $lookup, and $where rather than SQL-like syntax. Even though it also stores BSON/JSON documents, you cannot run standard SQL queries against it; existing code that expects SQL would require complete driver and query rewrites. This mismatch makes it incorrect for a scenario where the requirement explicitly implies performing SQL-like queries on JSON documents.

    When this WOULD be correct

    A question where the application already uses MongoDB drivers and needs to migrate to Azure Cosmos DB with minimal code changes, or where the query requirements are limited to MongoDB-style queries (e.g., find, aggregate) without needing SQL syntax.

  • Gremlin (Graph) API

    Why it's wrong here

    The Gremlin API is a graph database interface that models data as vertices and edges, and it is optimized for traversing relationships (like friend-of-friend or network connections) rather than for document storage and retrieval. Queries are written in Gremlin traversal steps such as out(), has(), and where(), which operate on graph topology and do not support SQL-like queries over JSON documents. Since the social media profiles are JSON documents and the explicit need is SQL-like querying, the Gremlin API is fundamentally mismatched with the stated requirements.

    When this WOULD be correct

    If the application needed to model complex relationships between users, such as social connections, friend-of-friend queries, or recommendation engines based on graph traversal, the Gremlin API would be the correct choice.

  • Table API

    Why it's wrong here

    The Table API is a key-value/wide-column store that enforces a fixed schema with a partition key and row key as the primary lookup mechanism, and it does not natively index or support querying arbitrary JSON fields. It is optimized for high-volume structured entities such as telemetry or logs, not for flexible JSON documents with optional properties like social media profiles. Its query capabilities are limited to OData-style filters on indexed keys, which cannot handle complex queries over optional profile attributes, making it a poor fit for this workload.

    When this WOULD be correct

    A question where the application stores structured, non-relational data with a fixed schema (e.g., device telemetry) and requires key-based lookups with O(1) latency, and does not need complex queries or nested JSON.

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 a document model that natively stores JSON documents and exposes a SQL-enabled query language specifically designed to query those documents. It automatically indexes every property within the JSON, allowing flexible queries on optional and nested fields, which is ideal for a social media app's user profiles that vary in structure. Because it supports SQL-like syntax that can filter on userId and any other key with minimal effort, it best matches the requirement for querying JSON profiles.

MongoDB APIWrong answer — click to see why

Why this is wrong here

The MongoDB API is designed for MongoDB wire protocol compatibility, not for native SQL-like queries. While it supports JSON documents, it cannot run SQL queries directly, which the application requires.

★ When this WOULD be the correct answer

A question where the application already uses MongoDB drivers and needs to migrate to Azure Cosmos DB with minimal code changes, or where the query requirements are limited to MongoDB-style queries (e.g., find, aggregate) without needing SQL syntax.

Why candidates choose this

Candidates see JSON documents and assume MongoDB is the natural choice, overlooking that the SQL API also stores JSON and provides SQL query capabilities.

Gremlin (Graph) APIWrong answer — click to see why

Why this is wrong here

The Gremlin (Graph) API is designed for graph data models with nodes and edges, not for JSON documents with optional fields. Querying by userId and running SQL-like queries on nested JSON is better suited to the SQL (Core) API.

★ When this WOULD be the correct answer

If the application needed to model complex relationships between users, such as social connections, friend-of-friend queries, or recommendation engines based on graph traversal, the Gremlin API would be the correct choice.

Why candidates choose this

Candidates may mistakenly think that because the data has optional fields and relationships (e.g., work history), a graph API is appropriate, overlooking that the query patterns are document-oriented and SQL-like.

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 optional fields. It does not support SQL-like queries on nested JSON properties like work history.

★ When this WOULD be the correct answer

A question where the application stores structured, non-relational data with a fixed schema (e.g., device telemetry) and requires key-based lookups with O(1) latency, and does not need complex queries or nested JSON.

Why candidates choose this

Candidates may confuse the Table API's simple key-value model with document storage, or assume any NoSQL API in Cosmos DB can handle JSON documents equally well.

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

One of 820 original DP-900 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.