DynamoDB 是 AWS 完全托管的 NoSQL 数据库——一个键值和文档存储,在任何规模下提供个位数毫秒级性能,具有自动扩展和无需管理服务器。它专为需要高性能和可扩展性的应用程序而设计。
DynamoDB 是什么
text
DynamoDB is a managed, serverless NoSQL database:
→ KEY-VALUE / DOCUMENT model (items in tables, flexible schema)
→ FAST — single-digit-millisecond latency at any scale
→ SCALABLE — handles massive throughput; scales automatically (serverless)
→ FULLY MANAGED — no servers, patching, or capacity planning (AWS handles it)
→ highly available and durable (replicated across AZs automatically)
关键概念
text
TABLE → a collection of items
ITEM → a record (like a row/document) with attributes
PRIMARY KEY → uniquely identifies items:
PARTITION KEY (hash key) → determines which partition stores the item (distribution)
optional SORT KEY → for ranges/sorting within a partition
SECONDARY INDEXES (GSI/LSI) → query by attributes other than the primary key
CAPACITY → on-demand (pay per request) or provisioned (set throughput)
