Consider the following schedule of two transactions and . Here and denote a read and a write of data item by , and denotes the commit of . Assume a single-version database in which each read returns the value of the latest preceding write to that item, or its initial value if no write precedes it.
Which of the following statements about is/are TRUE?
Show solution
Solution MSQ · 1 mark · no negative marking
Answer: (A) is conflict serializable.; (B) is recoverable.
Method: check serializability separately, then check recoverability, cascadelessness and strictness from their definitions.
Conflict serializability. Conflicting pairs (same item, different transactions, at least one write):
- before , and before : edge .
- before : edge .
No edge goes from to , so the precedence graph is acyclic and is equivalent to . (a) is true.
Recoverable. A schedule is recoverable if every transaction commits only after every transaction it read from has committed. reads (and later ) written by , and comes before . (b) is true.
Cascadeless. A transaction may read a value written by another transaction only after that writer commits. reads 's value of while is still active. Had aborted at that point, would have to be rolled back too. (c) is false.
Strict. After a transaction writes an item, no other transaction may read or write that item until the writer commits or aborts. Strict implies cascadeless, so (d) is false as well.
Trap. A dirty read alone does not make a schedule unrecoverable; what matters is the commit order of reader and writer. Here the writer commits first, so the schedule is recoverable but still exposed to cascading aborts.
What was tested: the chain strict ⊂ cascadeless ⊂ recoverable, and that serializability is a separate question from recoverability.
Copied. Paste it into the new chat.Too long to send. Copy the question and solution by hand.