A schedule of three database transactions , and is shown. and denote read and write of data item by transaction . The transaction aborts at the end. Which other transaction(s) will be required to be rolled back?
View worked solution
Answer: C
To determine which transactions must be rolled back when aborts, we need to identify any dirty reads (reading uncommitted data written by an active transaction).
Let's analyze the sequence of operations in the given schedule:
- : reads .
- : writes to .
- : reads .
- : reads . Since has written but has not committed yet, this is a dirty read. is now dependent on .
- : reads . This is also a dirty read of the uncommitted value written by . is now dependent on .
- : aborts.
Because aborts, any transaction that read uncommitted data written by must also be rolled back to prevent cascading inconsistency (cascading rollback).
- Since read from , must be rolled back.
- Since read from , must be rolled back.
Therefore, both and are required to be rolled back.
Free practice · Your answers on this page are not saved.
