သဘောတရား · CLF-C02 အပေါ် ဆက်လေ့လာရန်
Choosing a database by access pattern
Pick the database from how the data is used: its shape, the read and write mix, the scale and the latency.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
Cloud Practitioner မှ သင်သိပြီးသားများ
- Relational (Amazon RDS, Amazon Aurora), key-value (Amazon DynamoDB), document, graph and in-memory databases each fit a different job.
- Amazon Redshift is the data warehouse for reports.
- AWS DMS moves a database and AWS SCT converts its schema.
SQL, joins, transactions
- Speed and scale
- Milliseconds. Scale up, add read replicas
Key-value or document at huge scale
- Pick
DynamoDB
- Speed and scale
- Single-digit ms at any scale
Hot data, repeated reads
- Pick
ElastiCache
- Speed and scale
- Microseconds
MongoDB application
- Pick
DocumentDB
- Speed and scale
- Milliseconds, MongoDB API
Relationships between records
- Pick
Neptune
- Speed and scale
- Millisecond graph queries
Cassandra application
- Pick
Keyspaces
- Speed and scale
- Single-digit ms, CQL
Reports over years of data
- Pick
Redshift
- Speed and scale
- Seconds to minutes, columnar
| Need | Pick | Speed and scale |
|---|---|---|
| SQL, joins, transactions | Milliseconds. Scale up, add read replicas | |
| Key-value or document at huge scale | Single-digit ms at any scale | |
| Hot data, repeated reads | Microseconds | |
| MongoDB application | Milliseconds, MongoDB API | |
| Relationships between records | Millisecond graph queries | |
| Cassandra application | Single-digit ms, CQL | |
| Reports over years of data | Seconds to minutes, columnar |
1 / 3
SQL, joins, transactions
- Speed and scale
- Milliseconds. Scale up, add read replicas
Key-value or document at huge scale
- Pick
DynamoDB
- Speed and scale
- Single-digit ms at any scale
Hot data, repeated reads
- Pick
ElastiCache
- Speed and scale
- Microseconds
| Need | Pick | Speed and scale |
|---|---|---|
| SQL, joins, transactions | Milliseconds. Scale up, add read replicas | |
| Key-value or document at huge scale | Single-digit ms at any scale | |
| Hot data, repeated reads | Microseconds |
2 / 3
MongoDB application
- Pick
DocumentDB
- Speed and scale
- Milliseconds, MongoDB API
Relationships between records
- Pick
Neptune
- Speed and scale
- Millisecond graph queries
Cassandra application
- Pick
Keyspaces
- Speed and scale
- Single-digit ms, CQL
| Need | Pick | Speed and scale |
|---|---|---|
| MongoDB application | Milliseconds, MongoDB API | |
| Relationships between records | Millisecond graph queries | |
| Cassandra application | Single-digit ms, CQL |
ဘာလဲ
SAA questions describe how the data is used, not the product. Read the clue: joins and transactions, key lookups at huge scale, repeated reads that must answer in microseconds, relationships between records, or reports over years of data.
Then find the bottleneck. A read-heavy workload, such as a product catalog, scales with read replicas and a cache. A write-heavy workload, such as sensor data or orders at peak, needs a design that spreads the writes. A relational database has one writer that scales up, not out. So extreme write volume points to DynamoDB with a well chosen partition key.
မှတ်ထားရန်
- Joins, transactions, an existing SQL application: Amazon RDS or Amazon Aurora.
- Single-digit millisecond key-value access at any scale, with no servers: DynamoDB.
- Microsecond reads of hot data: Amazon ElastiCache, or DynamoDB Accelerator (DAX) in front of DynamoDB.
မှတ်ထားရန်
- Relationships: Amazon Neptune. MongoDB workloads: Amazon DocumentDB. Cassandra workloads: Amazon Keyspaces.
- Reports and BI over large history: Amazon Redshift, not a transactional database.
- Read-heavy: add read replicas or a cache. Write-heavy: spread the writes.
စာမေးပွဲမှာ
- “Complex joins and transactions” points to Amazon RDS or Amazon Aurora.
- “Millions of requests per second, single-digit millisecond latency, no capacity planning” points to DynamoDB.
- “Reduce read load on the database” points to read replicas or ElastiCache. “Microsecond reads” points to ElastiCache or DAX.
- “Highly connected data, such as fraud rings” points to Neptune.
ဒါတွေနဲ့ မရောပါနဲ့
Amazon AuroraA cloud-built MySQL- and PostgreSQL-compatible database with shared storage, fast failover and up to 15 replicas.
Amazon DynamoDBServerless key-value and document database. Design the key well and choose the capacity mode.
Amazon RedshiftA columnar data warehouse for repeated, complex SQL and BI. Choose nodes, Serverless, Spectrum and keys.