Hard1 markMultiple Choice
Domain 2.3: Recommend a data storage solutionDomain 2.3Cosmos DBPartitioning

AZ-305 · Question 25 · Domain 2.3: Recommend a data storage solution

You are designing an Azure Cosmos DB database for an e-commerce application. The database will store product catalog data. You need to select a partition key. The catalog has 10,000 categories and 5 million products. Queries almost always filter by 'CategoryId'. You need to ensure even distribution of storage and throughput. Which TWO statements describe the characteristics of a good partition key in this scenario? (Select TWO)

Answer options:

A.

It should have a high cardinality (many distinct values).

B.

It should have a low cardinality (few distinct values).

C.

It should be a property that is rarely used in queries.

D.

It should be a property that appears frequently as a filter in queries.

E.

It should be a property whose value changes frequently.

How to approach this question

Identify the two main rules for Cosmos DB partition keys: high cardinality and frequent query usage.

Full Answer

A,D
A good partition key in Cosmos DB must have high cardinality to ensure even distribution of storage and throughput (avoiding hot spots). It should also be frequently used in query filters to enable efficient single-partition queries.

Common mistakes

Choosing a key that is unique but never queried, resulting in expensive cross-partition queries.

Practice the full Azure Solutions Architect Expert AZ-305 Practice Exam 6

55 questions · hints · full answers · grading

More questions from this exam