Does DynamoDB support joins?

No. DynamoDB does not support joins. As a nonrelational database it has no JOIN operation, and PartiQL does not add one. Instead you denormalize — duplicate or embed related data so each access pattern is served by a single query — or use single-table design to co-locate related items under one partition key.

Why there is no join

DynamoDB is built for predictable, single-digit-millisecond reads at any scale. Joining at read time would make latency depend on how much related data exists, which breaks that guarantee. So the join is done at write time, by you.

What you do instead

  • Denormalization — copy or embed the related data you read together.
  • Single-table design — store multiple entity types in one table with overloaded keys, so an item collection reads them together in one Query.
  • Adjacency lists — model many-to-many relationships as items you Query by key.

The trade-off

You do more careful work on writes to make reads cheap and constant-time.

Go deeper

Read DynamoDB joins, single-table design, and one-to-many relationships. Download DynoTable to model related data visually.

不必透過主控台就能操作 DynamoDB

DynoTable 是一款快速的 DynamoDB 桌面用戶端 — 瀏覽表格、執行 SQL 風格的查詢,並在本機編輯項目。