AWS Certified Cloud Practitioner (CLF-C02) / Cloud Technology and Services

Relational databases and managed operations

Lesson 21 of 42. Open to read. No account needed.

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?

Three alternatives compare a database on EC2, conventional RDS and Aurora. All retain customer schema and access duties; the amount of server and database maintenance changes.

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_idcustomer_idstatus
B101C7confirmed
B102C8confirmed
B103C7cancelled
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

Service references checked on 25 September 2026. No AWS resources are required for this lesson.

Study this course with an account

Course access adds revision notes, the Exam Cheat Sheet, saved progress, bookmarks and your own notes.

INR 199 plus 18% GST. 90 days of online access. No auto-renewal.

See course access

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy