Let be the following schedule of operations of three transactions , and in a relational database system:
Consider the statements and below:
- : is conflict-serializable.
- : If commits before finishes, then is recoverable.
Which one of the following choices is correct?
View worked solution
Answer: B
To evaluate the statements, let us analyze the schedule step-by-step:
1. Checking Statement (Conflict-Serializability):
We identify conflicting operations (different transactions, same data item, at least one write) to construct the precedence graph:
- On : occurs before , which gives the edge .
- On : occurs before , which gives the edge .
- On : occurs before , which gives the edge .
The precedence graph contains the edges , , and . Since there are no cycles in this graph, the schedule is conflict-serializable. Thus, is true.
2. Checking Statement (Recoverability):
- There is a write-read dependency (dirty read) on data item because reads after it is written by ().
- For a schedule to be recoverable, any transaction that reads a value written by must commit only after commits.
- Therefore, must commit before commits.
- If commits before finishes, this condition is violated, making the schedule non-recoverable. Thus, is false.
Hence, is true and is false.
Free practice · Your answers on this page are not saved.
