Suppose a database schedule involves transactions . Construct the precedence graph of with vertices representing the transactions and edges representing the conflicts. If is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
GATE CSE 2016Databases › Transactions, Concurrency Control & IndexingVerified
GATE CSE 2016 PYQ: Suppose a database schedule S S S involves transactions T 1 , … , T n T_1,\ldots,T_n T 1 , … , T n .…
- ATopological orderCorrect answer
- BDepth-first order
- CBreadth-first order
- DAscending order of the transaction indices
Answer
(A) Topological order
Approach
Use the precedence-graph characterization of conflict-serializable schedules: a schedule is conflict serializable exactly when its precedence graph is acyclic. In an acyclic graph, a topological ordering places every conflict edge's source before its destination, so executing transactions in that order respects all conflicts and yields a serial schedule. DFS/BFS traversals and transaction-index order need not respect conflict edges.
The precedence-graph test uses conflict edges, and in the intended conflict-serializability sense, serializability means the graph is acyclic. A topological order of an acyclic precedence graph gives the transaction order of an equivalent serial schedule, while the other listed orders are not defined to respect conflict dependencies.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.