AWS DynamoDB is a fast, scalable, and fully managed NoSQL database service. This set of AWS DynamoDB MCQ questions and answers focuses on partitioning and throughput allocation, query and scan optimization, managing hot keys, and performance monitoring using CloudWatch. Enhance your DynamoDB knowledge with these thoughtfully crafted questions.
Partitioning and Throughput Allocation (10 MCQs)
What determines the partitioning of data in DynamoDB? a) The table size b) The primary key and its value distribution c) The number of global secondary indexes d) The number of items in a table
What happens if a partition key has an uneven distribution of values? a) Data is duplicated across partitions b) A single partition may become overloaded c) The entire table’s throughput decreases d) The partition is automatically resized
How does DynamoDB allocate throughput to partitions? a) Evenly across all partitions b) Based on the number of items in each partition c) Proportional to the partition’s storage size d) Dynamically based on workload
What is the key purpose of a partition key in DynamoDB? a) To store the hash value of data b) To determine where data is stored within partitions c) To allocate read/write capacity d) To define the primary sort order
What is the recommended approach to avoid “hot partitions” in DynamoDB? a) Use a single global secondary index b) Use evenly distributed partition key values c) Increase read/write capacity units d) Use the same partition key for all items
What is the impact of exceeding provisioned throughput on a DynamoDB table? a) Increased latency and throttling of requests b) Automatic scaling of throughput c) Data loss in affected partitions d) Temporary unavailability of the table
Which of the following can improve partition key distribution in DynamoDB? a) Adding more secondary indexes b) Using a composite primary key c) Using sequential numeric partition keys d) Increasing the table’s read/write capacity
How does DynamoDB internally store data across partitions? a) As relational tables b) As a single distributed hash table c) Using binary trees d) Using multiple distributed hash tables
What is the maximum size of a partition in DynamoDB? a) 10 GB b) 5 GB c) 1 TB d) 100 GB
Which factor primarily affects how DynamoDB scales its partitions? a) Storage usage and throughput requests b) The number of table attributes c) The number of queries per second d) Table replication settings
Query and Scan Optimization (10 MCQs)
What is the key difference between a DynamoDB Query and Scan? a) Query retrieves all items in a table, while Scan retrieves specific items b) Query requires a partition key, while Scan processes the entire table c) Query processes all attributes, while Scan processes only the primary key d) Query is slower than Scan
How can you improve the performance of a Scan operation? a) Use a global secondary index b) Reduce the projection expression c) Use parallel scans d) Decrease the provisioned capacity
Which operation is more efficient for retrieving a specific item in DynamoDB? a) Query b) Scan c) BatchGetItem d) BatchWriteItem
How does a global secondary index help optimize queries? a) By allowing queries without a partition key b) By distributing queries across multiple partitions c) By reducing the storage size of the table d) By combining multiple attributes into one query
Which attribute is required for a DynamoDB Query operation? a) Partition key b) Sort key c) Global secondary index d) Local secondary index
What is the impact of using a large projection expression in a query? a) Decreases read capacity unit consumption b) Increases read capacity unit consumption c) Reduces query response time d) Optimizes table storage
How does the “FilterExpression” in a query affect the results? a) Filters items after retrieving them from the database b) Limits the number of items stored in the database c) Speeds up query execution d) Optimizes partitioning
What does “Pagination” in DynamoDB refer to? a) Splitting table data across partitions b) Dividing query or scan results into smaller sets c) Managing indexes d) Reducing latency of queries
Which operation consumes more read capacity units: a Query or a Scan? a) Query b) Scan c) Both consume the same capacity d) Neither operation consumes capacity units
Which of these improves Scan efficiency? a) Using DynamoDB Accelerator (DAX) b) Increasing the read capacity units c) Adding local secondary indexes d) Limiting the table size
Managing Hot Keys (5 MCQs)
What is a “hot key” in DynamoDB? a) A partition key accessed more frequently than others b) A partition key that stores encrypted data c) A secondary index with high throughput usage d) A key used to optimize table queries
How can hot keys impact DynamoDB performance? a) Increase read/write capacity limits b) Cause throttling and reduced performance c) Decrease table replication efficiency d) Slow down table backup operations
Which technique is effective for mitigating hot key issues? a) Use sequential partition key values b) Introduce randomization in partition keys c) Increase table size d) Use global secondary indexes
Why is it important to identify and manage hot keys? a) To avoid table backup failures b) To prevent uneven capacity usage and throttling c) To reduce query costs d) To enable global table replication
Which AWS service can help monitor hot key activity in DynamoDB? a) AWS Config b) AWS CloudWatch c) AWS Glue d) AWS Step Functions
Monitoring and Performance Tuning with CloudWatch (5 MCQs)
Which CloudWatch metric measures the read capacity consumed by a DynamoDB table? a) ReadThrottleEvents b) ConsumedReadCapacityUnits c) ProvisionedReadCapacityUnits d) ReadRequestsPerSecond
What does the “ThrottledRequests” metric in CloudWatch indicate? a) High latency in queries b) Requests denied due to exceeding capacity limits c) Database replication issues d) Low partition key utilization
Which CloudWatch alarm would you set to monitor potential capacity issues in DynamoDB? a) High memory usage alarm b) Read/Write throttle alarms c) Low latency alarm d) Query cost alarm
How can CloudWatch logs help optimize DynamoDB performance? a) By showing partition key access patterns b) By resizing partitions c) By increasing throughput settings automatically d) By combining indexes
What does the “ProvisionedThroughputExceededException” indicate? a) A query with too many attributes b) Exceeding provisioned read/write capacity c) Incorrect table schema d) High latency in queries
Answers
Qno
Answer
1
b) The primary key and its value distribution
2
b) A single partition may become overloaded
3
a) Evenly across all partitions
4
b) To determine where data is stored within partitions
5
b) Use evenly distributed partition key values
6
a) Increased latency and throttling of requests
7
b) Using a composite primary key
8
b) As a single distributed hash table
9
a) 10 GB
10
a) Storage usage and throughput requests
11
b) Query requires a partition key, while Scan processes the entire table
12
c) Use parallel scans
13
a) Query
14
a) By allowing queries without a partition key
15
a) Partition key
16
b) Increases read capacity unit consumption
17
a) Filters items after retrieving them from the database
18
b) Dividing query or scan results into smaller sets
19
b) Scan
20
a) Using DynamoDB Accelerator (DAX)
21
a) A partition key accessed more frequently than others
22
b) Cause throttling and reduced performance
23
b) Introduce randomization in partition keys
24
b) To prevent uneven capacity usage and throttling
25
b) AWS CloudWatch
26
b) ConsumedReadCapacityUnits
27
b) Requests denied due to exceeding capacity limits