A booking service must remember which customer reserved which room and prevent two confirmed reservations from claiming the same availability. Storing text is only part of that problem. The application needs relationships between records and rules for updating them together.
Tables, Keys and Transactions
A relational database organizes records into tables. A row represents one record; columns hold attributes such as a customer identifier or arrival date. A primary key identifies a row. A booking can store a customer key to associate the reservation with the customer's record, rather than duplicating the customer's contact details in every booking.
SQL is a language for querying and changing relational data. A query can combine related tables using a join. A database engine, such as PostgreSQL or MySQL, implements the storage and query behavior. Choosing a managed service and choosing an engine are connected but different decisions.
A transaction groups changes into a unit that either commits successfully or is rolled back. Suppose confirming a booking both allocates availability and records the reservation. If only one operation succeeds, the records disagree. Correct transaction design keeps these changes consistent. The application must still use appropriate constraints and concurrency controls; buying a relational service does not automatically prevent double bookings.
Who Operates the Database?

The same relational requirement can have different operating models. These are alternatives, not services that every request must pass through.
On EC2, your team installs and operates the database software and guest operating system. It also arranges backups, maintenance and recovery. This gives control when software requires unusual extensions or operating-system access, but someone must do that work reliably.
Amazon RDS manages common infrastructure and database administration tasks for supported relational engines. In a conventional RDS deployment, AWS handles the underlying operating system and provides managed backup, patching and recovery capabilities. Customers select compatible settings, retention and deployment options. RDS Custom has a different responsibility boundary; it is not the model shown here.
You still design tables, permissions and queries. A slow query can need a better index or application change, not a larger server. An index is an additional data structure that helps locate records; it also has storage and update costs. Managed operations do not decide which people should see a customer's booking.
Amazon Aurora is a managed relational engine offered through RDS, with MySQL-compatible and PostgreSQL-compatible options. Its storage and clustering design differs from a conventional RDS deployment of those engines. Compatibility is not a guarantee that every extension, version or application behavior is identical. Check requirements before moving an existing database.
Availability, Read Capacity and Recovery
A Multi-AZ arrangement places database capacity across Availability Zones to support availability. A conventional RDS Multi-AZ DB instance has a standby for failover that does not serve reads. A Multi-AZ DB cluster is a different arrangement whose standby instances can also serve read traffic. Avoid the blanket rule that every Multi-AZ secondary is unreadable.
A read replica can offload supported read workloads. For conventional RDS read replicas, asynchronous replication means a replica can lag behind the source. A booking confirmation that needs the latest committed change should not blindly use a lagging read copy.
Replication and backups solve different problems. A replica can reproduce an unwanted deletion. A suitable recovery copy and retention policy help recover an earlier state. Customers must choose recovery settings and check that the application can reconnect or recover as intended; neither replication nor a managed service promises uninterrupted operation.
Choosing for the Booking Service
Assume the booking service uses supported PostgreSQL features, needs transactions, and has a small team with no requirement for host-level customization. RDS for PostgreSQL is a reasonable option to evaluate: it keeps the relational model while reducing routine infrastructure work. Aurora PostgreSQL-compatible is another candidate when its capabilities, compatibility and costs suit the workload.
The team still owns the transaction that allocates the room, database permissions and protection of booking details. It should choose availability and backup settings based on recovery needs. Running PostgreSQL on EC2 could satisfy the data model too, but adds administration that these requirements do not demand.
Read One Query Against Booking Rows
These fictional rows make the table idea concrete. A value such as C7 is a
customer identifier, not a password. No database installation is needed.
| booking_id | customer_id | status |
|---|---|---|
| B101 | C7 | confirmed |
| B102 | C8 | confirmed |
| B103 | C7 | cancelled |
SELECT booking_id
FROM bookings
WHERE customer_id = 'C7' AND status = 'confirmed';
SELECT chooses the returned column, FROM names the table, and WHERE
keeps only rows meeting both conditions joined by AND. The result is
B101: B102 belongs to a different customer and B103 is cancelled. This query
reads data; it does not confirm a booking or reserve a room.
The example is an illustrative query against the table above, not production application code. A real application must authenticate the caller and safely bind input values rather than join untrusted text into a query. A filter containing C7 does not prove the caller is customer C7. Moving the table from a self-managed engine to RDS changes administration, not this need to enforce authorization or design correct transactions.
Check Your Understanding
A team says, "Our database is managed, so AWS will prevent our application from issuing duplicate bookings. We will also use the standby of a conventional Multi-AZ DB instance for reporting." Which two assumptions need correction?
Answer and Reasoning
Application transaction design, constraints and permissions remain customer responsibilities. Managed infrastructure does not repair incorrect booking logic. The standby in the specified Multi-AZ DB instance arrangement supports failover, not reporting reads. Evaluate a supported read replica or a suitable readable cluster arrangement for reporting, considering replication lag and the application's consistency needs.
References
- S05: Content Domain 3: Cloud Technology and Services.
- S08: In-Scope AWS Services.
- S134: Amazon RDS overview and responsibilities.
- S135: Amazon Aurora overview.
- S136: RDS Multi-AZ deployment types.
- S137: RDS read replicas.
Service references checked on 25 September 2026. No AWS resources are required for this lesson.