A database system stores and queries persistent application data. A relational database is suited to structured data, such as articles, comments, users, accounts, and transactions. Relational databases typically emphasize consistency and ACID transactions: atomicity, consistency, isolation, and durability. section 10.0
Where the data goes
A web shop stores product information and orders in a database while a web server handles customer requests. WordPress similarly uses a MySQL database for its application data. The database is a separate component that the application needs to reach. section 1.2.1 section 2.0
On AWS, you can run a relational database yourself on virtual machines or use Amazon RDS, a managed relational database service. RDS supports PostgreSQL, MySQL, MariaDB, Oracle Database, and Microsoft SQL Server; Amazon Aurora is a MySQL- and PostgreSQL-compatible engine. Moving an existing application to RDS is generally straightforward when its database system is supported, though migrating the data can be the trickiest part. section 10.0
For a production database, plan beyond the initial launch:
- Protect access at both the network and database levels. For example, allow connections only from the application server’s subnet, then give the application a database user with the table permissions it needs. section 1.2.2 section 10.4.3
- Use snapshots and point-in-time restore for recovery, and Multi-AZ mode for high availability. Read replication can help read-intensive workloads; CloudWatch metrics can help diagnose performance and guide instance sizing. section 10.8
Table 10.1 Managed service RDS vs. a self-hosted database on virtual machines (view table figure)
Compare managed RDS with a self-hosted database: RDS costs more as an AWS service but can lower total operating costs; self-hosting offers more control and demands more database-management work. section 10.0
Check costs before leaving a test database running. The AWS Free Tier includes a small relational database with limited storage and backup, but usage beyond its limits is billed. section 1.4.1























