Discussion
Consider the following database schedule with two transactions, \(T_{1}\) and \(T_{2}\).
\(S = r_{2}(X); r_{1}(X); r_{2}(Y); w_{1}(X); r_{1}(Y); w_{2}(X); a_{1}; a_{2}\)
where \(r_{i}(Z)\) denotes a read operation by transaction \(T_{i}\) on a variable \(Z\), \(w_{i}(Z)\) denotes a write operation by \(T_{i}\) on a variable \(Z\) and \(a_{i}\) denotes an abort by transaction \(T_{i}\).
Which one of the following statements about the above schedule is TRUE?
Answer: C
The true statement is S does not have a cascading abort.
A cascading abort happens when one transaction has read a value written by another uncommitted transaction, so aborting the writer forces the reader to abort too. Check the reads in \(S\):
- \(r_{2}(X)\) and \(r_{1}(X)\) both read X before anyone writes it.
- \(r_{2}(Y)\) and \(r_{1}(Y)\) read Y, which nobody writes.
No transaction reads uncommitted data (there are no dirty reads), so the abort of \(T_{1}\) forces nothing on \(T_{2}\): no cascade. For the same reason the schedule is not non-recoverable, since non-recoverability requires a dirty read. It is not strict, because \(w_{2}(X)\) overwrites X after \(w_{1}(X)\) while \(T_{1}\) has neither committed nor aborted. The option “recoverable, but has a cascading abort” fails because there is no cascade.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development