サービス · データベース
Amazon DynamoDB
A serverless NoSQL key-value database with single-digit millisecond performance at any scale.
このレッスンはまだ翻訳されていないため、英語で表示しています。
- 1A user’s request arrives at Amazon API Gateway.
- 2API Gateway runs an AWS Lambda function.
- 3The function reads or writes an item in DynamoDB by its key, in milliseconds.
- 4With global tables, DynamoDB keeps a copy of the table in another Region. Both copies accept reads and writes.
流れ
- 1A user’s request arrives at Amazon API Gateway.
- 2API Gateway runs an AWS Lambda function.
- 3The function reads or writes an item in DynamoDB by its key, in milliseconds.
- 4With global tables, DynamoDB keeps a copy of the table in another Region. Both copies accept reads and writes.
A serverless application, with no servers to manage from the request to the data.
Data model
- RDS
- Tables with fixed columns, linked by keys
- DynamoDB
- Items you fetch by key, each with its own attributes
How you query
- RDS
- SQL, with joins between tables
- DynamoDB
- Read and write items by key, with no joins
Servers
- RDS
- You pick an instance size
- DynamoDB
- None to manage: it is serverless
Choose it when
- RDS
- You need SQL, joins and complex queries
- DynamoDB
- You need fast lookups by key at any scale
| 比較項目 | RDS | DynamoDB |
|---|---|---|
| Data model | Tables with fixed columns, linked by keys | Items you fetch by key, each with its own attributes |
| How you query | SQL, with joins between tables | Read and write items by key, with no joins |
| Servers | You pick an instance size | None to manage: it is serverless |
| Choose it when | You need SQL, joins and complex queries | You need fast lookups by key at any scale |
1 / 2
Data model
- RDS
- Tables with fixed columns, linked by keys
- DynamoDB
- Items you fetch by key, each with its own attributes
How you query
- RDS
- SQL, with joins between tables
- DynamoDB
- Read and write items by key, with no joins
| 比較項目 | RDS | DynamoDB |
|---|---|---|
| Data model | Tables with fixed columns, linked by keys | Items you fetch by key, each with its own attributes |
| How you query | SQL, with joins between tables | Read and write items by key, with no joins |
2 / 2
Servers
- RDS
- You pick an instance size
- DynamoDB
- None to manage: it is serverless
Choose it when
- RDS
- You need SQL, joins and complex queries
- DynamoDB
- You need fast lookups by key at any scale
| 比較項目 | RDS | DynamoDB |
|---|---|---|
| Servers | You pick an instance size | None to manage: it is serverless |
| Choose it when | You need SQL, joins and complex queries | You need fast lookups by key at any scale |
概要
Amazon DynamoDB is a serverless, fully managed NoSQL database. There are no servers to choose, patch or scale. You create a table, then read and write items by their key. Response times stay in single-digit milliseconds whether you have a hundred users or a hundred million.
DynamoDB supports key-value and document data. Items in the same table can have different attributes. There are no joins between tables, which is part of how it stays fast at any size.
概要
Data is copied across three Availability Zones automatically. Global tables keep copies of a table in other Regions that you choose, and every copy accepts reads and writes. For microsecond reads, DynamoDB Accelerator (DAX) adds an in-memory cache in front of a table.
覚えること
- Serverless: no servers, no versions to upgrade, no maintenance windows.
- NoSQL: key-value and document data, with no joins.
- Single-digit millisecond performance at any scale.
- On-demand mode charges per request and scales by itself. Provisioned mode suits steady, predictable traffic.
覚えること
- Global tables: multi-Region and multi-active.
- Data is encrypted at rest by default.
試験では
- “Serverless NoSQL database with millisecond performance at any scale” points to Amazon DynamoDB.
- “Store shopping carts or game state for millions of users” points to DynamoDB. “An in-memory cache that speeds up reads” points to Amazon ElastiCache instead.
- “Complex SQL queries with joins” points to a relational database, such as Amazon Relational Database Service (Amazon RDS), instead.
混同しやすいもの
Amazon Relational Database Service (Amazon RDS)A managed relational database. You pick the engine, and AWS handles setup, patching, backups and failover.
Amazon DocumentDBA managed document database for JSON-like data, compatible with MongoDB.
Amazon ElastiCacheA managed in-memory cache that answers in microseconds and takes load off your database.