Amazon DynamoDB (50 Qs)•Part 2: Intermediate Data Modeling & API Operations (Mid-Level)
What is Single-Table Design in DynamoDB and why is it recommended?
junior LevelDynamoDBHTTP & REST APIs
In Simple Words: Instead of modeling relational tables (Users, Orders, Items, Payments) into separate DynamoDB tables, Single-Table Design stores all application entities inside one consolidated table:
- Mechanism: Overloads generic primary key attributes named
PKandSK. - Query Efficiency: Allows fetching a parent entity and all its child relationships (e.g. User Profile + 5 Recent Orders) in a single round-trip query using
PK = "USER#101" AND SK begins_with("ORDER#"). - Reduces connection overhead, eliminates multi-table joins, and minimizes AWS costs.