liveBook · Manning

Database

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

A database system is software that manages persistent data storage, querying, and updates.

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)

 

Amazon RDS

Self-hosted on virtual machines

Cost for AWS services

Higher because RDS costs more than virtual machines (EC2)

Lower because virtual machines (EC2) are cheaper than RDS

Total cost of ownership

Lower because operating costs are split among many customers

Much higher because you need your own manpower to manage your database

Quality

AWS professionals are responsible for the managed service.

You’ll need to build a team of professionals and implement quality control yourself.

Flexibility

High, because you can choose a relational database system and most of the configuration parameters

Higher, because you can control every part of the relational database system you installed on virtual machines

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

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Explains relational database purpose and RDS operating choices, but defers database-system-specific user administration.
Examples
Uses a product-and-order web shop, a WordPress MySQL database, and an enterprise SQL application.
What it assumes
Introduces relational databases through familiar applications and explains ACID, while leaving database-specific access-management details to database documentation.
What you can do after
Operate/configure a relational database with Amazon RDS, including access controls, recovery, availability, and monitoring.
How it connects
Connects databases to application servers, virtual networks, access control, backups, high availability, and monitoring.

Also explained in

Compare how 24 books explain database →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.