Question 1
16 marks
Banking database transactions, rollback recovery, validation vs verification, and ACID isolation
- Databases
(a)(i)
3 marks
- An operation is a single, elementary action performed on a database (such as a single read or write command).
- A transaction is a logical unit of work comprising a sequence of multiple operations that must all succeed together to preserve database consistency.
- Example: A cash withdrawal transaction combines an initial query operation to check the current balance followed by an update operation to deduct the withdrawn sum.
Mentor tip
Contrast a single atomic database action (operation) with a multi-step logical unit of work (transaction) using a banking example.
(a)(ii)
1 mark
A transaction must be rolled back if any constituent operation fails before completion (e.g., network interruption, hardware failure, or insufficient account funds).
Mentor tip
Any condition preventing the full sequence of operations from completing successfully triggers a rollback.
(a)(iii)
1 mark
Restores the database to its exact consistent state prior to the start of the transaction, undoing any partial modifications.
Mentor tip
State clearly that the database is returned to its pre-transaction state.
(b)
4 marks
- 1) Built-in transaction and concurrency management: A database engine enforces ACID guarantees and record locking out of the box, ensuring deposits and withdrawals do not corrupt balances.
- 2) Standardized querying and reduced redundancy: Centralizing customer and account records eliminates duplicate data entry and provides fast, standardized retrieval and sorting across multiple banking workflows.
Mentor tip
Provide two distinct reasons (e.g., transaction integrity and efficient querying/minimal redundancy) with an elaboration for each.
(c)
4 marks
- Data Validation:
- - Definition: Automated check ensuring entered input conforms to expected data type, range, and format rules.
- - Banking Example: Checking that the deposit amount field contains a positive numeric currency value rather than alphabetic characters or a negative number.
- Data Verification:
- - Definition: Confirming that the data entered into the system accurately matches the original source value intended by the user.
- - Banking Example: Prompting the teller or customer to enter the deposit amount twice (double entry) or displaying a confirmation screen to verify the figure before committing.
Mentor tip
Remember: validation checks 'is it sensible/valid format?' while verification checks 'was it copied/typed accurately as intended?'
(d)
3 marks
- Isolation ensures that multiple transactions executing concurrently leave the database in the exact same state as if they had been executed sequentially one after another.
- Without isolation, interleaved read/write steps can cause a lost update anomaly.
- Banking Example: If a 50 withdrawal occur simultaneously on an account, isolation locks the balance so both updates apply cleanly in sequence, guaranteeing a net change of -$40 rather than one transaction overwriting the other.
Mentor tip
Define isolation in terms of sequential equivalence and illustrate with simultaneous deposit/withdrawal amounts.

