Describe considerations for working with non-relational data on Azure →mediumMultiple ChoiceObjective-mapped
DP-900 Practice Question: Describe considerations for working with non-relational data on Azure
A gaming company stores player scores in Azure Cosmos DB using the NoSQL API. Each document contains: PlayerID (unique to player), GameID, Score, Timestamp. The most common query is: 'Retrieve all scores for a specific GameID, ordered by Score descending.' Which property should be chosen as the partition key to minimize Request Unit (RU) consumption?
⚠ Common exam trap
The trap here is that candidates often pick PlayerID because it's unique and seems like a natural key, but they fail to realize that a partition key must align with the most common query filter to avoid costly cross-partition queries, not just be unique.
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
✓
GameID
GameID is the correct partition key because the most common query filters on GameID, and Cosmos DB routes each query to the physical partition(s) containing that GameID's data. Using GameID ensures the query touches only the relevant partition(s), minimizing RU consumption by avoiding cross-partition fan-out. A partition key that matches the filter predicate is essential for efficient, single-partition queries.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
PlayerID
Why it's wrong here
PlayerID is a high-cardinality partition key: every player's documents would land on their own partition. Since the workload queries scores by GameID, a PlayerID partition key forces a fan-out (cross-partition) query across every partition, multiplying RU consumption. It also provides no collocation benefit for the actual read pattern. Therefore it is an inefficient choice.
- ✓
GameID
Why this is correct
GameID directly matches the query predicate, so all score documents for a given game are stored contiguously on the same logical partition. A query filtering on GameID is a single-partition query, which is the most RU-efficient and lowest-latency pattern in Azure Cosmos DB. GameID also offers sufficient cardinality and activity distribution to avoid hot partitions.
- ✗
Score
Why it's wrong here
Score is an attribute that changes frequently and is not used as the filter in the reported query; choosing it as partition key would scatter a game's scores across many partitions, again requiring expensive fan-out queries. Moreover, Score's distribution is likely skewed (e.g., many players with typical values), which can produce hot partitions for the most common score values. Because partition key values are logically immutable and tied to physical storage, a mutable, non-filtering property like Score is fundamentally the wrong granularity.
- ✗
Timestamp
Why it's wrong here
Timestamp is a monotonically increasing value; all new scores are always written to the partition representing the current time, creating a single hot partition that absorbs the entire write throughput. Additionally, the query filters by GameID, not by time, so even if writes were balanced, every query would still have to scan all partitions. A key that does not align with the read pattern and suffers from write skew is an especially poor partition key choice.
Go deeper
Related to this question
Learn chapter
Data Roles and Core Concepts
Key term
Partition key
A partition key is a value used by database systems to distribute data across multiple storage partitions, enabling faster queries and efficient scaling.
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
This DP-900 question is part of Courseiva's 820-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.