Interview practice question
Designing a DynamoDB table
System Design · Databases · Intermediate
You must design a DynamoDB table for an app where users have orders, and you query "orders by user, newest first" and "order by order ID". How do you model it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Partition key user_id, sort key order timestamp/ID.
- Query user's orders sorted.
- Global secondary index on order_id.
- Model from access patterns.
- Avoid scans.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.