Consider the following database schedule with two transactions and .
Where denotes a read operation by transaction on a variable , denotes a write operation by on a variable and denotes an abort by transaction .
Which one of the following statements about the above schedule is TRUE?
View worked solution
Answer: C
To determine the correct statement about the schedule , let us analyze the dependencies and properties of the transactions:
1. Checking for Dirty Reads (Cascading Aborts)
A dirty read occurs when a transaction reads a data item that has been modified by another active transaction (which has not yet committed or aborted).
- writes to (). After this, no other transaction reads .
- writes to (). After this, no other transaction reads .
- There are no other write operations in the schedule.
Since no transaction reads uncommitted data written by another transaction, there are no dirty reads in the schedule. Consequently, the abort of () does not force to abort, and vice-versa. Thus, the schedule is cascadeless (i.e., it does not have cascading aborts).
2. Checking for Recoverability
Since the schedule is cascadeless, it is automatically recoverable. Therefore, Option A is false.
3. Checking for Strictness
A schedule is strict if a transaction can only read or write a data item after all previous transactions that wrote have committed or aborted.
- writes to () at step 4.
- writes to () at step 6, before aborts at step 7 ().
Since performs a write on while 's write on is still uncommitted/unaborted, the schedule is not strict. Therefore, Option D is false.
Conclusion
The schedule is recoverable and does not have cascading aborts. Hence, Option C is the correct statement.
Free practice · Your answers on this page are not saved.
