Courseiva

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

A hospital stores patient vital signs data in Azure Cosmos DB. Each document contains PatientID, Timestamp, HeartRate, BloodPressure, and other measurements. The most common query retrieves all vital signs for a specific patient within a time range (e.g., last 24 hours). Which property should be chosen as the partition key to minimize Request Unit (RU) consumption and ensure even data distribution?

⚠ Common exam trap

Microsoft often tests the misconception that Timestamp is a good partition key for time-based queries, but candidates fail to realize that Timestamp causes hot partitions and does not distribute write load evenly.

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

PatientID

PatientID is the ideal partition key because the most common query filters by PatientID and a time range. With PatientID as the partition key, Cosmos DB can route the query to a single physical partition containing all documents for that patient, minimizing cross-partition queries and reducing RU consumption. It also ensures even data distribution since each patient generates a similar volume of vital signs data, avoiding hot partitions.

Answer analysis

Option-by-option breakdown

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

  • PatientID

    Why this is correct

    PatientID is an ideal partition key because it is the natural filtering attribute for the most common query: retrieving all vital signs for a specific patient. It has high cardinality, since each patient has a unique identifier, so data is spread evenly across logical partitions. Queries that include PatientID are single-partition queries, which are the fastest and most cost-effective in Azure Cosmos DB, avoiding cross-partition fan-out.

  • Timestamp

    Why it's wrong here

    Timestamp is a poor partition key because inserts for time-series data like vital signs are inherently sequential, so all new documents are written to the single logical partition representing the current time window. This creates a hot partition that consumes all the provisioned throughput for that partition while other partitions remain idle, causing throttling and poor performance. Additionally, timestamp alone is not a common filtering attribute for patient-specific queries, and any query by patient would become an expensive cross-partition operation.

  • HeartRate

    Why it's wrong here

    HeartRate is a measurement value with low cardinality, as it typically falls within a narrow physiological range (e.g., 40–200 bpm) and many readings will have identical values. Using it as a partition key creates large logical partitions for common heart rates and tiny partitions for uncommon ones, leading to unbalanced storage and inefficient query execution. Moreover, queries are rarely filtered solely by heart rate, so this key does not align with actual access patterns.

  • BloodPressure

    Why it's wrong here

    BloodPressure, whether stored as a single string like '120/80' or as separate fields, has limited distinct values in practice and is not the attribute used in most clinical queries. Partitioning on such a low-cardinality measurement causes uneven distribution, where a few popular pressure values hold disproportionately large data volumes. It also fails to convert common queries into single-partition operations, because those queries typically filter by patient identifier rather than by a specific blood pressure reading.

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.