MCQs on Data Modeling and Partitioning | Azure Cosmos DB MCQs Questions

Azure Cosmos DB is a globally distributed, multi-model database service designed for high availability and low latency. Chapter 3 explores critical topics such as designing efficient data models, implementing effective partitioning strategies, configuring indexing policies, and managing RU consumption. These Azure Cosmos DB MCQ questions and answers are ideal for developers and database administrators aiming to optimize performance and scalability. Enhance your knowledge with these carefully crafted questions covering logical and physical partitioning, indexing policies, and RU cost optimization, ensuring you’re well-prepared for real-world applications and Azure certification exams.


Multiple-Choice Questions (MCQs)

Designing Efficient Data Models for Cosmos DB

  1. What is the key principle of designing data models in Azure Cosmos DB?
    a) Normalization of data
    b) Data denormalization and entity grouping
    c) Strictly relational modeling
    d) Indexing all fields
  2. Which factor is most critical in Cosmos DB data modeling for performance?
    a) Entity size
    b) Network latency
    c) Partition key selection
    d) Query parameter length
  3. What is a key advantage of embedding data in Cosmos DB models?
    a) Reduced query complexity
    b) Increased storage requirements
    c) Reduced partitioning efficiency
    d) Improved write latency
  4. How should relationships between entities be modeled in Cosmos DB?
    a) By using joins across multiple containers
    b) By embedding or referencing data
    c) By creating a foreign key constraint
    d) By using normalization
  5. What is an anti-pattern in Cosmos DB data modeling?
    a) Using a single partition key for all entities
    b) Denormalizing data for performance
    c) Embedding related entities
    d) Indexing frequently queried fields

Partitioning Strategies and Best Practices

  1. What determines the partitioning strategy in Azure Cosmos DB?
    a) Query cost and throughput requirements
    b) Storage capacity of each partition
    c) Network bandwidth
    d) Indexing policy
  2. Which attribute is ideal for selecting a partition key?
    a) High cardinality and evenly distributed values
    b) Low cardinality with fixed values
    c) Attributes with NULL values
    d) Non-unique attributes
  3. What is the maximum size of a physical partition in Cosmos DB?
    a) 10 GB
    b) 50 GB
    c) 100 GB
    d) 500 GB
  4. Which of the following is NOT a good practice for partitioning?
    a) Choosing a partition key with a wide range of unique values
    b) Avoiding hot partitions
    c) Using GUIDs as partition keys for all workloads
    d) Designing partitions for query efficiency
  5. What happens when the data in a partition exceeds its maximum size?
    a) The partition is split automatically
    b) Data is deleted to make space
    c) Queries are redirected to other partitions
    d) The throughput decreases

Logical and Physical Partitioning

  1. Logical partitions in Cosmos DB are determined by:
    a) Indexing policies
    b) Partition key values
    c) The number of physical partitions
    d) Storage tier configuration
  2. Physical partitions in Cosmos DB are used to:
    a) Store data across multiple Azure regions
    b) Manage logical partition distribution
    c) Handle only backup and recovery
    d) Execute transactions sequentially
  3. How are partition keys related to physical partitions?
    a) They ensure data is evenly distributed across physical partitions
    b) They group all data into a single physical partition
    c) They have no impact on physical partitions
    d) They only affect query indexing
  4. Which factor does NOT affect the number of physical partitions?
    a) Total provisioned RU/s
    b) Data size in the container
    c) Number of logical partitions
    d) Region count
  5. What is the default size limit for a single logical partition?
    a) 10 GB
    b) 20 GB
    c) 100 GB
    d) Unlimited

Indexing Policies and Indexing Modes

  1. What is the default indexing policy in Cosmos DB?
    a) No indexing
    b) Lazy indexing
    c) Automatic indexing of all fields
    d) Manual indexing
  2. Which indexing mode minimizes RU consumption for write operations?
    a) Lazy indexing
    b) Exclusion indexing
    c) Consistent indexing
    d) None indexing
  3. What is a composite index in Cosmos DB used for?
    a) Optimizing queries with multiple filters
    b) Improving storage efficiency
    c) Distributing data across regions
    d) Managing partition splits
  4. How can indexing be disabled for specific fields in a container?
    a) By using composite indexes
    b) By excluding them in the indexing policy
    c) By setting partition key constraints
    d) By modifying the RU configuration
  5. Which tool can be used to view and modify Cosmos DB indexing policies?
    a) Azure Monitor
    b) Azure Portal
    c) Cosmos DB SDK only
    d) Data Migration Tool

Understanding RU Consumption in Data Modeling

  1. What does RU/s in Cosmos DB measure?
    a) Storage usage per second
    b) Query complexity per second
    c) Throughput and performance
    d) Total data operations
  2. Which operation typically consumes the highest RU/s?
    a) Point read
    b) Write operation
    c) Query with multiple filters
    d) Deleting a document
  3. How can you reduce RU consumption for a query?
    a) Use a smaller partition key
    b) Disable indexing for unnecessary fields
    c) Increase the number of physical partitions
    d) Store data in multiple containers
  4. What is a key factor that affects RU/s consumption?
    a) Number of indexes
    b) Network latency
    c) Physical partition count
    d) Data model complexity
  5. What is the minimum RU/s that can be provisioned for a container?
    a) 100 RU/s
    b) 400 RU/s
    c) 1,000 RU/s
    d) 10,000 RU/s

Scenario-Based Questions

  1. A query is frequently throttled due to high RU consumption. What should you do?
    a) Reduce the indexing policy complexity
    b) Increase provisioned RU/s
    c) Change the container’s consistency level
    d) Split the query into smaller parts
  2. Data in your container is highly skewed across partitions. What might be the issue?
    a) Partition key has low cardinality
    b) Data model is normalized
    c) Too many indexes are defined
    d) RU/s are misconfigured
  3. Your application requires global distribution with minimal latency. What should you configure?
    a) Multi-master writes
    b) Composite indexes
    c) Cross-region failover
    d) Manual indexing
  4. A write operation is slower than expected. What could be the cause?
    a) High RU/s provisioned
    b) Hot partition due to poor key selection
    c) High query parallelism
    d) Reduced consistency level
  5. How do you analyze RU consumption for specific queries?
    a) Use Azure Monitor logs
    b) Query Metrics in the Azure Portal
    c) Data Migration Tool
    d) Application Insights

Answers

QNoAnswer
1b) Data denormalization and entity grouping
2c) Partition key selection
3a) Reduced query complexity
4b) By embedding or referencing data
5a) Using a single partition key for all entities
6a) Query cost and throughput requirements
7a) High cardinality and evenly distributed values
8c) 100 GB
9c) Using GUIDs as partition keys for all workloads
10a) The partition is split automatically
11b) Partition key values
12b) Manage logical partition distribution
13a) They ensure data is evenly distributed across physical partitions
14d) Region count
15a) 10 GB
16c) Automatic indexing of all fields
17d) None indexing
18a) Optimizing queries with multiple filters
19b) By excluding them in the indexing policy
20b) Azure Portal
21c) Throughput and performance
22b) Write operation
23b) Disable indexing for unnecessary fields
24d) Data model complexity
25b) 400 RU/s
26b) Increase provisioned RU/s
27a) Partition key has low cardinality
28a) Multi-master writes
29b) Hot partition due to poor key selection
30b) Query Metrics in the Azure Portal

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top