0
0
DynamoDBquery~5 mins

Partition key selection in DynamoDB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AThe number of tables
BThe size of the database
CWhere data is stored and how it is accessed
DThe encryption method
Which is a sign of a poor partition key choice?
AMany unique values
BLow cardinality causing hot partitions
CEven data distribution
DUsing user IDs
What is a composite primary key made of?
APartition key and sort key
BTwo partition keys
CSort key only
DPartition key and timestamp
Which attribute is best for a partition key?
AUser ID with many unique values
BFixed category name
CStatus with values like 'open' or 'closed'
DBoolean flag
What problem do hot partitions cause?
AAutomatic backups
BFaster queries
CMore storage space
DSlower performance and throttling
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.