Courseiva

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

A mobile gaming company stores player activity logs as JSON documents. Each document has a unique ActivityID, a PlayerID, a timestamp, and a variable set of attributes depending on the game event (e.g., level started, item purchased). The application requires low-latency point reads by ActivityID and needs to query logs by PlayerID for a given time range. Schema flexibility is critical because new game events are added frequently. Which Azure Cosmos DB API should they choose?

⚠ Common exam trap

Many candidates choose the MongoDB API assuming it is the only option for JSON documents, but they overlook that the NoSQL API provides superior query flexibility and indexing for time-range queries, and that all Cosmos DB APIs support JSON documents but with different query capabilities.

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

NoSQL API (formerly SQL API)

The NoSQL API (formerly SQL API) is the correct choice because it natively supports JSON documents with flexible schemas, enabling the variable attributes required for new game events. It provides low-latency point reads by ActivityID via direct partition key lookups and supports efficient queries by PlayerID within a time range using composite indexes or cross-partition queries with filtering. This API is optimized for schema-agnostic, document-based workloads and offers the richest query capabilities for JSON data in Azure Cosmos DB.

Answer analysis

Option-by-option breakdown

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

  • NoSQL API (formerly SQL API)

    Why this is correct

    The NoSQL API (formerly SQL API) is the correct choice because it provides native JSON document storage with a flexible schema, automatic indexing, and a SQL-like query language (technically a dialect of SQL over JSON) that supports efficient point reads (by id and partition key) and range queries on indexed fields. It is deeply integrated into Azure Cosmos DB's core engine, meaning no translation layer or separate compatibility layer is required, which yields the lowest latency and richest querying experience for JSON logs. Unlike the other APIs, it requires no existing expertise in MongoDB, Cassandra, or graph modeling, making it the most straightforward and performant option for a team that simply wants to store and query player activity in JSON.

  • MongoDB API

    Why it's wrong here

    Incorrect. While MongoDB API also supports JSON documents, it uses MongoDB's query language and may not be the best choice if the team is not already using MongoDB; the NoSQL API is more native to Azure Cosmos DB.

  • Cassandra API

    Why it's wrong here

    The Cassandra API is incorrect for this workload because it is designed for wide-column storage and uses the Cassandra Query Language (CQL) with a partitioned-row model, which is optimized for high-throughput write-heavy scenarios with predictable access patterns based on partition keys. JSON documents can be inserted as text values, but Cassandra does not natively index or query arbitrary nested JSON fields; you must model columns to match the varied attributes, defeating the flexible-schema benefit of JSON. In a mobile gaming scenario with diverse player events containing different nested properties, this would force rigid schema design and complex queries, making it a poor fit compared to the NoSQL API's document-first approach.

  • Gremlin API

    Why it's wrong here

    The Gremlin API is incorrect because it implements a graph database model, storing data as vertices and edges to represent entities and their relationships, not as standalone JSON documents with flexible schema. While you could serialize entire JSON objects into vertex properties, the Gremlin API's query language (Gremlin) is built for traversing relationships (e.g., 'friends of player X') and not for efficient ad-hoc filtering or range queries over document fields. For player activity logs — which are independent time-series events with varied attributes and no need for graph traversal — using Gremlin would add unnecessary complexity and force a graph structure onto data that is naturally document-oriented, making it the wrong tool for this use case.

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.