What is a Database?
A database is a structured system for storing information so it can be found quickly. Think of it like a well-organized Excel spreadsheet where you can search for any piece of information in seconds.
AWS offers many types of database services. Understanding what each one does best is key to choosing the right one for any given situation.
---
Relational vs Non-Relational — What is the Difference?
The most important concept to understand first is the difference between two database categories.
A relational database looks like an Excel spreadsheet. Data is stored in tables with rows and columns. Every piece of data must follow a predefined format called a schema. You search and update data using a language called SQL.
A non-relational database is more like a notebook. There is no fixed format, so data can be stored in many different shapes. It is very fast and very flexible.
---
Amazon RDS (Relational Database Service)
RDS lets you run MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, or Aurora on AWS as a fully managed service.
"Managed" means AWS takes care of certain tasks for you. Operating system updates, database engine patches, and automatic backups are all handled by AWS. You focus only on your queries and application logic.
Two important features to know.
Multi-AZ deployment: AWS creates a standby database in a different AZ that stays in sync with your main database. If the main database fails, AWS automatically switches to the standby. This is high availability. Read Replicas: A read-only copy of your database that handles read requests so your main database is less burdened. Used for performance improvement.
---
Amazon Aurora
A relational database built from scratch by AWS. It is fully compatible with MySQL and PostgreSQL.
Aurora characteristics.
Up to 5 times faster than MySQL and 3 times faster than PostgreSQL. Storage automatically grows in 10 GB increments up to 128 TB. Automatically maintains 6 copies of your data across 3 Availability Zones. Extremely fast failover with minimal data loss.
If you are already running MySQL or PostgreSQL, migrating to Aurora can give you a significant performance boost.
---
Amazon DynamoDB
A key-value, non-relational (NoSQL) database. Data is stored in a flexible format rather than fixed tables.
DynamoDB characteristics.
Serverless: No server setup required, no capacity planning needed. Scales automatically with traffic. Single-digit millisecond response time: Data retrieval is incredibly fast. Global Tables: Automatically replicates data across multiple regions so anyone around the world gets fast access.
---
Other Database Services
| Service | When do you use it? | |---------|-------------------| | Amazon ElastiCache | Stores frequently read data in memory for ultra-fast delivery. Based on Redis or Memcached. | | Amazon Redshift | A data warehouse for analyzing billions of records. Connects with business intelligence tools. | | Amazon Neptune | A graph database for data with complex relationships, like social networks or recommendation engines. | | Amazon DocumentDB | A document database compatible with MongoDB. Stores JSON-shaped data. | | AWS DMS (Database Migration Service) | Migrates a running database to another destination without interrupting service. |
---
Which Service for Which Situation?
| Situation | Use this service | |-----------|----------------| | Structured data, SQL queries needed | RDS or Aurora | | Already using MySQL/PostgreSQL but need more speed | Aurora | | Flexible schema, ultra-fast response needed | DynamoDB | | Cache frequently read data for speed | ElastiCache | | Analyze large volumes of data, generate reports | Redshift | | Social graphs, recommendation engines | Neptune |
---
Exam Quick Reference
"Relational DB, SQL, managed service" — RDS "MySQL/PostgreSQL compatible, up to 5x faster" — Aurora "Key-value, serverless, millisecond response" — DynamoDB "Cache frequently read data in memory" — ElastiCache "Large-scale analytics, data warehouse" — Redshift "Relationship data, social networks" — Neptune "Migrate a running database" — AWS DMS RDS Multi-AZ is for high availability (failover). Read Replicas are for performance. Do not confuse the two.