1Single Table Design
In traditional SQL, you normalize data across many tables. In DynamoDB, the best practice is 'Single Table Design'—putting all entity types into one table and using generic PK/SK structures (e.g., PK='USER#123', SK='ORDER#456').
2Step-by-Step Breakdown
What is DynamoDB?. A fully managed, serverless, NoSQL key-value and document database designed to run high-performance applications.
Tables, Items, Attributes. Unlike SQL (Tables, Rows, Columns), DynamoDB uses Tables, Items, and Attributes. Schema is flexible.
Partition Keys (PK). The primary key must have a Partition Key. It dictates which physical server the data resides on.
Sort Keys (SK). Optional. Groups items with the same Partition Key and allows rich range queries (e.g., sort by Date).
Knowledge Check. Which DynamoDB key dictates the physical server node where data is stored?
- →Sort Key
- →Partition Key
Provisioned Capacity. You define Read Capacity Units (RCUs) and Write Capacity Units (WCUs) upfront. Ideal for predictable workloads.
On-Demand Capacity. Pay-per-request. DynamoDB instantly accommodates workloads scaling from 0 to thousands of requests per second.
DynamoDB Accelerator (DAX). An in-memory cache specifically for DynamoDB that delivers microsecond response times.
DynamoDB Streams. A time-ordered sequence of item-level changes. Perfect for triggering AWS Lambda functions on data updates.
Summary. DynamoDB is the foundation of serverless architectures.
