Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 4.03 KB

File metadata and controls

29 lines (23 loc) · 4.03 KB

Partitions and data distribution

Key Concepts

Concept Description
Partition A partition is an allocation of storage for a table, backed by solid state drives (SSDs) and automatically replicated across multiple Availability Zones within an AWS Region.
Partition key DynamoDB uses the value of the partition key as input to an internal hash function.
- Hence it must be specified in both read and write operations.
Primary Key When you create a table, in addition to the table name, you must specify the primary key of the table.
- The primary key uniquely identifies each item in the table, so that no two items can have the same key.

Types of primary key

Primary Key type Description
⭐ Composite Primary Key - Partition key and sort key All items with the same partition key value are stored together, in sorted order by sort key value.
- This helps in querying items more efficiently.
Partition key only We can only use partition key as primary key (must be specified in both read and write operations).

References