Machine-translated by Google. Questions are authored in English.
Top

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?

  • 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

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.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.