Question 1
15 marks
Hotel booking database transactions, data versus information, isolation, and data sharing
- Databases
(a)
2 marks
- Distinguish raw data from processed information in the hotel booking context:
- Data consists of unorganized, unprocessed values lacking context on their own, such as the isolated booking string '3EP9RE'.
- Information is structured, interpreted data that carries meaning for the recipient, such as the follow-up confirmation email linking the code '3EP9RE' to the specific reservation details (double non-smoking room at the Overlook Hotel).
Mentor tip
Contrast raw symbols (the alphanumeric booking code alone) with contextualized output (the detailed confirmation message).
(b)
2 marks
- Define a database transaction:
- A database transaction is a single logical unit of work comprising a minimal sequence of read/write operations executed on a database.
- It must execute completely or not at all (atomicity) to maintain database integrity, prevent conflicting room reservations, and allow recovery if a failure occurs.
Mentor tip
Emphasize that a transaction is an indivisible unit of work that preserves database consistency and supports rollback on failure.
(c)
3 marks
- Describe how transactions enforce data consistency:
- 1. Atomicity and Persistence: All modifications within the booking transaction become permanent (committed) only if every step in the sequence terminates successfully.
- 2. Rollback on Failure: If any hardware, network, or logical failure interrupts the transaction prior to completion, a rollback operation undoes all partial changes.
- 3. State Preservation: Rolling back restores the database to its prior consistent state, ensuring rooms are neither double-booked nor marked unavailable without a valid payment and confirmation.
Mentor tip
Link transaction completion (commit) and failure recovery (rollback) directly to preserving a valid, consistent state.
(d)
2 marks
- Explain transaction isolation in the room reservation scenario:
- Isolation (concurrency control) ensures that intermediate states of an ongoing transaction are invisible to other concurrent operations until the transaction commits.
- For example, while one customer is booking a specific double room, record locking prevents a second customer from simultaneously reserving the same room and causing a double-booking inconsistency.
Mentor tip
Include both the theoretical definition of isolation (concurrent operations cannot interfere) and a concrete example (locking a room record during booking).
(e)
6 marks
- Explain the technical mechanism of data sharing:
- 1. Data sharing and replication expose selected portions of source hotel databases to authorized external systems or user groups.
- 2. Bringing relevant data closer to end users reduces redundant network transmission overhead and allows heterogeneous systems to query standardized views.
- Explain benefits for Stakeholder 1 (Tourists / End Users):
- 3. Tourists can rapidly query and compare room availability, features, and pricing across numerous hotels from a single unified interface.
- 4. Real-time access prevents wasted effort attempting to book rooms that are already occupied.
- Explain benefits for Stakeholder 2 (Best Fare Aggregation Service / Hotels):
- 5. Best Fare can dynamically aggregate offers from multiple hotels and scale its platform to new partner hotels without redesigning its core software.
- 6. Individual hotels gain broader market visibility and can update local room rates or availability in real time while maintaining control over their internal operational records.
Mentor tip
Cover the technical nature of database sharing/replication first, then provide two distinct points for each of two stakeholders (e.g., tourists and the comparison platform or hotel).

