Courseiva

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

A retail company stores product catalog data in Azure Cosmos DB for NoSQL. Each product document has a unique 'id' and a 'category' field. The application performs frequent queries that filter by 'category' and retrieve a few products at a time. To optimize performance and cost, you need to choose an appropriate partition key. What should you do?

⚠ Common exam trap

The trap here is assuming that a unique key like 'id' always makes the best partition key, without considering the query patterns and the need to avoid cross-partition queries.

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

✓

Use 'category' as the partition key.

Choosing 'category' as the partition key aligns with the frequent query pattern that filters by category. This allows those queries to be served from a single logical partition, minimizing cross-partition fan-out and reducing latency and RU consumption. It also supports horizontal scaling as long as categories are sufficiently diverse and no single category becomes an extreme hot partition.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Use 'id' as the partition key.

    Why it's wrong here

    Using 'id' as the partition key distributes data evenly, but queries filtering by 'category' would need to scan all partitions, causing cross-partition queries. This increases latency and RU consumption. While 'id' is unique, it does not align with the common query pattern, making it a poor choice for optimizing category-based lookups.

  • ✗

    Create a synthetic partition key by concatenating 'category' and 'id'.

    Why it's wrong here

    A synthetic key combining category and id would create many partitions, but queries filtering only by category would still need to scan all partitions because the partition key includes id. This defeats the purpose of aligning the partition key with the query filter. It also complicates lookups by id alone, which would become cross-partition.

  • ✗

    Use a fixed partition key value such as 'product'.

    Why it's wrong here

    A fixed partition key value places all documents in a single logical partition, limiting scalability to a single partition's throughput and storage limits. This creates a hot partition and prevents the container from scaling out. While queries by category would be within one partition, the overall system would not scale, making this a bad design.

  • ✓

    Use 'category' as the partition key.

    Why this is correct

    Partitioning by 'category' allows queries filtering on category to target a single logical partition, reducing cross-partition fan-out and improving performance. It also enables efficient scaling if categories are well-distributed. However, if a single category grows very large (e.g., 'electronics' with millions of items), it may become a hot partition, but for typical catalogs with many categories, this is a good choice.

About these practice questions

This DP-900 question is part of Courseiva's 851-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

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.