Table Best Practices

Understand some tips for table design.

Single-table design

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.

Get hands-on with 1200+ tech skills courses.