Recall & Review
beginner
What is a partition key in DynamoDB?
A partition key is the primary attribute used to distribute data across partitions in DynamoDB. It determines where the data is stored and how it is accessed.
Click to reveal answer
beginner
Why is choosing a good partition key important?
A good partition key ensures even data distribution and avoids 'hot partitions' that can slow down performance. It helps DynamoDB scale efficiently.
Click to reveal answer
intermediate
What happens if a partition key has low cardinality?
Low cardinality means few unique values for the partition key. This causes uneven data distribution and can create hot partitions, leading to slower queries.
Click to reveal answer
intermediate
How can you choose a partition key to avoid hot partitions?
Pick a key with many unique values that are accessed evenly. For example, use user IDs or order IDs instead of a fixed status or category.
Click to reveal answer
beginner
What is a composite primary key in DynamoDB?
A composite primary key uses both a partition key and a sort key. This allows multiple items to share the same partition key but be uniquely identified by the sort key.
Click to reveal answer
What does the partition key in DynamoDB determine?
✗ Incorrect
The partition key determines the physical location of data and how DynamoDB accesses it.
Which is a sign of a poor partition key choice?
✗ Incorrect
Low cardinality means few unique values, causing uneven data distribution and hot partitions.
What is a composite primary key made of?
✗ Incorrect
A composite primary key combines a partition key and a sort key to uniquely identify items.
Which attribute is best for a partition key?
✗ Incorrect
User ID usually has many unique values, helping distribute data evenly.
What problem do hot partitions cause?
✗ Incorrect
Hot partitions cause slower performance because too many requests target the same partition.
Explain why selecting a good partition key is important in DynamoDB.
Think about how data is stored and accessed.
You got /4 concepts.
Describe what a composite primary key is and when you might use it.
Consider how to store related items together.
You got /4 concepts.