Describe considerations for working with non-relational data on Azure →easyMultiple ChoiceObjective-mapped
DP-900 Practice Question: Describe considerations for working with non-relational data on Azure
A social media application stores user posts as JSON documents in Azure Cosmos DB. Each post includes fields such as postId, userId, content, timestamp, and an array of tags. The development team wants to query posts by userId and timestamp range using a SQL-like syntax. Which Azure Cosmos DB API should they choose?
⚠ Common exam trap
Many exam-takers confuse 'SQL-like syntax' with any API that supports querying, but only the Core SQL API provides native SQL SELECT statements over JSON documents, while other APIs use different query languages (e.g., MongoDB's query operators, Cassandra's CQL) that are not SQL-like in the standard sense.
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
✓
B. Azure Cosmos DB for NoSQL API (Core SQL API)
The Azure Cosmos DB for NoSQL API (Core SQL API) is the correct choice because it natively supports SQL-like querying (SELECT, WHERE, ORDER BY) over JSON documents. The team's requirement to query posts by userId and timestamp range using SQL-like syntax is directly supported by this API, which treats each JSON document as an item and allows filtering on nested fields like userId and timestamp. Other APIs either lack native SQL-like syntax or are optimized for different data models (e.g., MongoDB uses a JSON-like query language, Table API uses OData, Cassandra uses CQL).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A. Azure Cosmos DB for MongoDB API
Why it's wrong here
While the MongoDB API also stores JSON-like BSON documents and supports rich queries, its query language is MongoDB-specific, such as db.posts.find({userId: id, timestamp: {$gt: time}}), not the ANSI-inspired SQL syntax the team prefers. The aggregation pipeline and MongoDB operators differ fundamentally from the SQL dialect used by the NoSQL API, so adopting it would not meet the stated preference. It is therefore a valid document store but a worse fit for this specific requirement.
When this WOULD be correct
If the development team needed to use MongoDB tools, drivers, and query syntax (e.g., db.posts.find({userId: '123'})), and the application already used MongoDB, then Azure Cosmos DB for MongoDB API would be the correct choice.
- ✓
B. Azure Cosmos DB for NoSQL API (Core SQL API)
Why this is correct
Azure Cosmos DB NoSQL API stores documents natively as JSON, and its SQL-like query syntax (SELECT * FROM c WHERE c.userId = @id AND c.timestamp > @time) is directly optimized for these documents. The API auto-indexes every property, enabling efficient range scans on timestamp and equality filters on userId without manual index tuning. This makes it the most natural fit for a social media post store requiring flexible schemas and rich queries.
- ✗
C. Azure Cosmos DB for Table API
Why it's wrong here
The Table API is a key-value store that treats each entity as a row with only primitive properties (string, binary, bool, etc.), so nested JSON fields like post metadata are not first-class citizens. Queries are limited to partition key and row key lookups, plus loosely filtered scans on a few indexed properties; they cannot perform range queries on a timestamp within a nested document. Consequently, it would force denormalization and lose the document querying capabilities this workload needs.
When this WOULD be correct
A question asking for an API to store and query large volumes of structured, non-relational data (e.g., sensor readings) with fast point lookups by partition key and row key, and where SQL-like queries are not required. The Table API would be correct for simple key-value access with O(1) latency.
- ✗
D. Azure Cosmos DB for Apache Cassandra API
Why it's wrong here
The Cassandra API implements CQL (Cassandra Query Language), which resembles SQL but is built around partitioning and wide-column tables, not hierarchical JSON. Each JSON post would have to be flattened into multiple columns, and querying on userId and timestamp would require careful primary key design involving partition keys and clustering columns. This introduces significant schema complexity and likely sacrifices the ability to query arbitrary nested fields, making it inappropriate for flexible document posts.
When this WOULD be correct
An application requires a distributed, high-write-throughput database for time-series data with a schema that can be modeled as wide-column rows, and the team prefers using CQL for queries.
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.
✓B. Azure Cosmos DB for NoSQL API (Core SQL API)Correct answer▾
Why this is correct
Azure Cosmos DB NoSQL API stores documents natively as JSON, and its SQL-like query syntax (SELECT * FROM c WHERE c.userId = @id AND c.timestamp > @time) is directly optimized for these documents. The API auto-indexes every property, enabling efficient range scans on timestamp and equality filters on userId without manual index tuning. This makes it the most natural fit for a social media post store requiring flexible schemas and rich queries.
✗A. Azure Cosmos DB for MongoDB APIWrong answer — click to see why▾
Why this is wrong here
The MongoDB API uses a MongoDB-compatible query language, not SQL-like syntax. The question specifically requires SQL-like queries, which is a feature of the Core (SQL) API.
★ When this WOULD be the correct answer
If the development team needed to use MongoDB tools, drivers, and query syntax (e.g., db.posts.find({userId: '123'})), and the application already used MongoDB, then Azure Cosmos DB for MongoDB API would be the correct choice.
Why candidates choose this
Candidates may confuse JSON document storage with MongoDB, assuming MongoDB is the only option for JSON documents, or they may not realize that Cosmos DB's Core API also supports JSON documents with SQL-like queries.
✗C. Azure Cosmos DB for Table APIWrong answer — click to see why▾
Why this is wrong here
The Table API uses key/attribute-based lookups and does not support SQL-like queries with WHERE clauses on non-key fields like userId and timestamp range. It is designed for simple key-value access, not complex queries on JSON documents.
★ When this WOULD be the correct answer
A question asking for an API to store and query large volumes of structured, non-relational data (e.g., sensor readings) with fast point lookups by partition key and row key, and where SQL-like queries are not required. The Table API would be correct for simple key-value access with O(1) latency.
Why candidates choose this
Candidates may confuse the Table API's support for querying by partition key and row key with the ability to query on arbitrary fields, or they may think 'Table' implies general-purpose querying similar to SQL tables.
✗D. Azure Cosmos DB for Apache Cassandra APIWrong answer — click to see why▾
Why this is wrong here
The Cassandra API uses CQL (Cassandra Query Language) and is optimized for wide-column, high-throughput workloads, not for SQL-like queries on JSON documents with nested arrays like tags.
★ When this WOULD be the correct answer
An application requires a distributed, high-write-throughput database for time-series data with a schema that can be modeled as wide-column rows, and the team prefers using CQL for queries.
Why candidates choose this
Candidates may confuse Cassandra's CQL with SQL-like syntax, or assume that any NoSQL API in Cosmos DB supports similar querying capabilities for JSON documents.
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?”
Visual reference
Go deeper
Related to this question
Learn chapter
Data Roles and Core Concepts
Key term
Azure Cosmos DB
Azure Cosmos DB is a fully managed, globally distributed NoSQL database service that offers fast reads and writes anywhere in the world with automatic scaling and multiple consistency models.
Key term
Data
Data is raw, unprocessed information, like numbers, words, or measurements, that can be stored, processed, and analyzed by computers.
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 →
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.