Table Best Practices
There is a difference between how we model data in SQL databases and how we model data in DynamoDB. In SQL databases the primary concern is to save space and provide query flexibility. In DynamoDB we are primarily concerned about speed.
Let’s take the example of a shopping cart. There are users and orders. One user can be associated with multiple orders. In a SQL-based design, there are two tables, like the ones illustrated below.