Open In App

GATE | GATE-CS-2016 (Set 2) | Question 32

Like Article
Like
Save
Share
Report

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?

(A) Topological order
(B) Depth-first order
(C) Breadth-first order
(D) Ascending order of transaction indices


Answer: (A)

Explanation: Cycle in precedence graph tells that schedule is not conflict serializable. DFS and BFS traversal of graph are possible even if graph contains cycle. And hence DFS and BFS are also possible for non serializable graphs. But Topological sort of any cyclic graph is not possible. Thus topological sort guarantees graph to be serializable . Option D is not valid because in a transaction with more indices might have to come before lower one. Also two non- conflicting schedule can occur simultaneously.

This explanation has been contributed by Abhishek Kumar.

Quiz of this Question


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads