Suppose a database schedule S involves transactions T1, …,Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
Suppose a database schedule S involves transactions T1, …,Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule? Correct Answer Topological order
Serial schedule is possible only when precedence graph doesn’t contain cycle. If precedence graph contains a cycle, it means schedule is not conflict serializable.
Breadth first search and Depth first search of a graph are possible even if graph contains cycle.
Topological sort in a graph will not work if graph contains a cycle.
Consider a directed acyclic graph:
[ alt="F1 R.S 24.12.19 Pallavi D 8" src="//storage.googleapis.com/tb-img/production/19/12/F1_R.S_24.12.19_Pallavi_D%208.png" style="width: 147px; height: 227px;">
Here Two orders possible: V2, V3, V1, V4, V5, V6 OR V3, V2, V1, V4, V5, V6.
In case of ascending order of transaction indices, two non-conflicting schedules can occur simultaneously.