Module Objective: Distinguish relational and non-relational databases, describe AWS's purpose-built database services, and identify which service fits a given data model and access pattern.
Builds on Module 7 — managed databases are, underneath, another way of putting compute and storage to work together.
Relational vs. Non-Relational Databases
The most fundamental database decision is the data model: how data is structured and queried. AWS offers managed services purpose-built for both major models rather than a single one-size-fits-all database.
| Model | Structure | Best For |
|---|---|---|
| Relational (SQL) | Structured tables with fixed schemas, related by keys, queried with SQL | Transactional systems needing complex joins and strong consistency, e.g. order management |
| Non-relational (NoSQL) | Flexible schemas — key-value, document, graph, or wide-column | High-scale, high-velocity workloads with simpler access patterns, e.g. session state, product catalogs |
Amazon RDS
Amazon Relational Database Service (RDS) is a managed service for relational databases, handling provisioning, patching, backups, and failover so customers don't have to manage the underlying database engine's infrastructure.
| Feature | What It Does |
|---|---|
| Supported engines | MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, and Amazon Aurora |
| Automated backups | Takes daily snapshots and streams transaction logs for point-in-time recovery |
| Multi-AZ deployment | Maintains a synchronously replicated standby in a different AZ, with automatic failover |
| Read replicas | Asynchronously replicated, read-only copies used to offload read traffic from the primary instance |
Amazon Aurora
Amazon Aurora is a MySQL- and PostgreSQL-compatible relational database engine, built by AWS specifically for the cloud, offered as one of the engine choices within Amazon RDS.
| Property | Detail |
|---|---|
| Compatibility | Drop-in compatible with existing MySQL or PostgreSQL applications and tools |
| Storage architecture | Storage automatically scales and is replicated six ways across three AZs |
| Aurora Serverless | Automatically starts up, scales capacity, and shuts down based on application demand |
Amazon DynamoDB
Amazon DynamoDB is a fully managed, serverless NoSQL key-value and document database, designed for consistent, single-digit-millisecond performance at any scale.
| Property | Detail |
|---|---|
| Serverless | No servers to provision or patch; capacity can scale automatically with demand |
| Schema flexibility | Items in the same table don't need identical attributes |
| Billing modes | On-demand (pay per request) or provisioned capacity (pay for reserved throughput) |
Caching: Amazon ElastiCache
Amazon ElastiCache is a fully managed, in-memory caching service, supporting the open-source Redis and Memcached engines, used to reduce load on a primary database and speed up read-heavy applications.
| Engine | Distinguishing Feature |
|---|---|
| Redis | Supports richer data structures, replication, and persistence |
| Memcached | Simpler, multi-threaded, purely in-memory caching |
Analytics: Amazon Redshift
Amazon Redshift is a fully managed data warehouse service, optimized for running complex analytical queries across very large volumes of data — a different job than RDS, Aurora, or DynamoDB are built for.
| Property | Detail |
|---|---|
| Workload type | Online analytical processing (OLAP) — large, complex queries across historical data |
| Column-oriented storage | Stores data by column rather than by row, speeding up aggregate queries across many records |
| Typical source | Data is often loaded in from operational databases (RDS, DynamoDB) or Amazon S3 for reporting and business intelligence |
Migrating Databases: AWS Database Migration Service
AWS Database Migration Service (DMS) migrates databases into AWS with minimal downtime, and can also perform ongoing replication between a source and target database.
| Capability | Detail |
|---|---|
| Homogeneous migration | Migrating between the same database engine, e.g. on-premises MySQL to Amazon RDS for MySQL |
| Heterogeneous migration | Migrating between different engines, e.g. Oracle to Aurora, typically paired with the AWS Schema Conversion Tool (SCT) |
| Continuous replication | Keeps a source and target database in sync during a migration to minimize cutover downtime |
Choosing the Right Database Service
As with compute and storage, the right database service follows from the workload's data model and access pattern.
| Need | Likely Fit |
|---|---|
| Traditional relational application, existing SQL engine | Amazon RDS |
| High-throughput, cloud-native relational workload | Amazon Aurora |
| Massive scale, simple access patterns, low-latency reads/writes | Amazon DynamoDB |
| Reduce read load and latency on an existing database | Amazon ElastiCache |
| Large-scale historical reporting and business intelligence | Amazon Redshift |
| Move an existing database into AWS with minimal downtime | AWS Database Migration Service |
Key Terms for Module 8
- relational database
- A database using structured tables with fixed schemas, related by keys and queried with SQL
- non-relational (NoSQL) database
- A database using a flexible schema model such as key-value, document, or wide-column
- Amazon RDS
- AWS's managed service for relational databases, supporting several engines including Aurora
- Multi-AZ deployment
- An RDS configuration maintaining a synchronously replicated standby database in another AZ for automatic failover
- read replica
- An asynchronously replicated, read-only copy of a database used to offload read traffic
- Amazon Aurora
- AWS's cloud-native, MySQL- and PostgreSQL-compatible relational database engine
- Amazon DynamoDB
- AWS's fully managed, serverless NoSQL key-value and document database
- Amazon ElastiCache
- A fully managed in-memory caching service supporting Redis and Memcached
- Amazon Redshift
- AWS's fully managed data warehouse service for large-scale analytical (OLAP) queries
- AWS Database Migration Service (DMS)
- Migrates databases into AWS with minimal downtime and supports ongoing replication
Review Questions
- What is the fundamental difference between a relational and a non-relational database, and what kind of workload favors each?
- What is the difference between what Multi-AZ deployment and read replicas each solve for in Amazon RDS?
- How does Amazon Aurora relate to Amazon RDS — is it a separate service or an option within RDS?
- Why might a high-scale, serverless application favor Amazon DynamoDB over Amazon RDS?
- What role does Amazon ElastiCache play relative to a primary database like RDS or DynamoDB?
- What is the difference between OLTP and OLAP, and which AWS services are built for each?
- What is the headline benefit AWS Database Migration Service provides during a database migration?