Bird
0
0

In single-table design, what is the role of the sort key?

easy🧠 Conceptual Q2 of 15
DynamoDB - Access Patterns and Query Optimization
In single-table design, what is the role of the sort key?
ATo group related items within the same partition
BTo uniquely identify each item across all partitions
CTo replace the partition key
DTo store large binary data
Step-by-Step Solution
Solution:
  1. Step 1: Understand sort key function

    The sort key organizes items within the same partition key, allowing related items to be grouped and sorted.
  2. Step 2: Evaluate options

    To group related items within the same partition correctly describes this role. To uniquely identify each item across all partitions is incorrect because partition key plus sort key together uniquely identify items. Options C and D are unrelated.
  3. Final Answer:

    To group related items within the same partition -> Option A
  4. Quick Check:

    Sort key groups items = B [OK]
Quick Trick: Sort key groups related items inside a partition [OK]
Common Mistakes:
MISTAKES
  • Thinking sort key replaces partition key
  • Believing sort key stores large data
  • Confusing unique identification with partition key only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More DynamoDB Quizzes