Consider the following database schedule with two transactions, \(T_1\) and…
2016
Consider the following database schedule with two transactions, \(T_1\) and \(T_2\).
\(S= r_{2}\left(X\right); r_{1}\left(X\right); r_{2} \left(Y\right); w_{1} \left(X\right); r_{1} \left(Y\right); w_{2} \left(X\right); 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 ai denotes an abort by transaction \(T_i\) .
Which one of the following statements about the above schedule is TRUE?
- A.
\(S\)is non-recoverable - B.
\(S\)is recoverable, but has a cascading abort - C.
\(S\)does not have a cascading abort - D.
\(S\)is strict
Attempted by 115 students.
Show answer & explanation
Correct answer: C
Key idea: a cascading abort happens only if a transaction reads a value written by another transaction that later aborts.
Check the reads in the schedule: r2(X), r1(X), r2(Y), and r1(Y) all read the initial values (no read observes a value written by another transaction).
Since no transaction reads an uncommitted write from another transaction that later aborts, there is no cascading abort.
Additional note: the schedule is recoverable (no read-from-uncommitted-write dependencies), but it is not strict because w2(X) overwrites w1(X) before T1 has committed or aborted.
A video solution is available for this question — log in and enroll to watch it.