
- access patterns (random reads, streaming writes, analytical scans),
- consistency and isolation guarantees (ACID transactions vs. eventual consistency),
- latency characteristics (milliseconds for OLTP vs. seconds for OLAP),
- scalability models (vertical vs. horizontal scaling),
- and data shapes (rows/columns, documents, key-value, graphs, time-series).
- A streaming service like Netflix needs databases that provide high write throughput, low-latency reads at scale, and horizontal elasticity.
- A financial system requires strong consistency, ACID transactions, and strict durability.
- A social network may combine document stores, key-value caches, and graph databases for different features.
When choosing a database, match the database’s strengths to your application’s dominant access patterns and constraints (e.g., transactional guarantees, latency, scale, data shape). Often a system uses more than one database type — a pattern known as polyglot persistence.
Common database types, characteristics, and AWS services
Factors to consider when selecting a database
- Data model: relational tables vs. documents vs. key-value vs. graph.
- Consistency and transactions: do you need ACID transactions or eventual consistency?
- Query patterns: point lookups, range scans, joins, aggregations, graph traversals.
- Latency and throughput: single-digit millisecond reads vs. high write throughput.
- Scale and elasticity: expected growth, read/write distribution, and partitioning.
- Durability and backup needs: point-in-time recovery, replication, and backups.
- Operational overhead: fully managed service vs. self-managed instances.
- Cost model: storage, IOPS, data transfer, and provisioned capacity vs. on-demand.
- Indexing and secondary access paths: support for indexes, GSI/LSI, and search.
- Security and compliance: encryption, VPC integration, IAM controls, audit logging.
Choosing the wrong database for your workload can cause scalability, data consistency, or cost problems. Evaluate the dominant access pattern first — if reads are mostly point lookups, a key-value store might be ideal; if you need complex joins and transactions, choose a relational database.
Quick mapping: common scenarios to database choices
- High-volume, low-latency lookups (millisecond reads): DynamoDB or ElastiCache.
- Flexible JSON documents with rich querying: DocumentDB or DynamoDB (document model).
- ACID transactions and complex joins: Amazon RDS / Amazon Aurora (MySQL/Postgres).
- Low-latency caching for reads: ElastiCache (Redis).
- Analytical queries across petabytes: Amazon Redshift or Athena over S3.
- Time-series metrics and IoT: Amazon Timestream.
- Graph relationship queries: Amazon Neptune.
- Multi-model or mixed workloads: combine services (e.g., Aurora for transactions + Redshift for analytics + ElastiCache for hot reads).
Further reading and references
- AWS Database Services Overview
- AWS Solutions Architect Associate — Database topics (learn.kodekloud.com)
- Amazon DynamoDB Developer Guide
- Amazon Aurora Documentation