48 48 votes Consider the following schedule for transactions $T1, T2$ and $T3:$$$\begin{array}{|c|c|c|}\hline \textbf{T1} & \textbf{T2} & \textbf{T3} \\\hline \text{Read(X)} & \text{} & \text{} \\\hline \text{} & \text{Read(Y)} & \text{} \\\hline \text{} & \text{} & \text{Read(Y)} \\\hline \text{} & \text{Write(Y)} & \text{} \\\hline \text{Write(X)} & \text{} & \text{} \\\hline \text{} & \text{} & \text{Write(X)} \\\hline \text{} & \text{Read(X)} & \text{} \\\hline \text{} & \text{Write(X)} & \text{} \\\hline\end{array}$$Which one of the schedules below is the correct serialization of the above?$T1 \to T3 \to T2$$T2 \to T1 \to T3$$T2 \to T3 \to T1$$T3 \to T1 \to T2$ Databases gatecse-2010 databases transaction-and-concurrency normal + – go_editor 16.6k views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply Aravind commented Sep 30, 2014 i reshown by Aravind Sep 30, 2014 reply Follow flag in T3 are they over writing x value with y value ? 0 0 replyShare rhl commented May 28, 2023 i edited by rhl Sep 9, 2025 reply Follow flag We have 3 Notions of serializablity based on ease of implementation.since we are not given computations therefore we can’t check for general serializability.Conflict serializability and View serializability only focuses on read and write operation.The view serializability is strongest serializability we can check here. so check based on it.In this question the schedule is both Conflict serializable and View Serializable. 4 4 replyShare Patel_And_Patel commented 4 days ago i edited by Patel_And_Patel 4 days ago reply Follow flag CHECK FOR VIEW SERIALIZABILITY HERE . NOT CONFLICT SERIALIZABILITY CHECK FOR CONFLICT SERIALIZABILITY IS MAJOR MISCONCEPTION HERE . 0 0 replyShare Patel_And_Patel commented 4 days ago reply Follow flag https://gateoverflow.in/2343/gate-cse-2010-question-42?show=550192#a550192 CHECK OUT THIS ANSWER FOR CORRECT AND CLEAR UNDERSTANDING 0 0 replyShare Please log in or register to add a comment.
Best answer 66 66 votes Answer is option A. create precedence graph and apply Topological sort on it to obtain $T1 \rightarrow T3 \rightarrow T2$ amarVashishth answered Oct 24, 2015 • edited May 6, 2021 by Gyanu amarVashishth comment Share Follow See all 8 Comments 8 8 Comments reply Show 5 previous comments coder_yash commented Sep 22, 2020 reply Follow flag @Ayush Upadhyaya check for view serializability here.Final write of X is made by T2, so in equivalent serial order T2 should come last. Sir then, Initial Read on X and Y is done by T1 and T2 respectively. But if we look at the answer it says initial read on X and Y is done by T1 and T3 respectively. How can it be view serializable? 0 0 replyShare shashank023 commented Nov 20, 2020 reply Follow flag amarVashishth why there is an edge from T1 to T2? In dependency graph each edge represents a conflicting operation and We should only consider latest write for conflicting operations. So $\\ W_{3}(X) -R_{2}(X) \: and \: W_{3}(X)-W_{2}(X)\\$ should only be considered not $\\ W_{1}(X) -R_{2}(X) \: and \: W_{1}(X)-W_{2}(X)\\$ 0 0 replyShare Patel_And_Patel commented 4 days ago reply Follow flag CHECK FOR VIEW SERIALIZABILITY HERE . NOT CONFLICT SERIALIZABILITY 0 0 replyShare Please log in or register to add a comment.
9 9 votes The solution is described here. hence option A is True. Jarvis answered May 27, 2015 • edited Aug 1, 2015 Jarvis comment Share Follow See all 2 Comments 2 2 Comments reply Deepika Sharma commented Dec 17, 2018 reply Follow flag how we apply topological ordering ..i draw the graph but after how to know its serialize or not 0 0 replyShare Ashutosh mandal commented Apr 11, 2025 reply Follow flag first take the vertex with no incoming edge .then remove all edges linked to that vertex you remove . and so on . 0 0 replyShare Please log in or register to add a comment.
6 6 votes You can use method of conflict serializability graph or precedence graph Ref: Elmasri Navathe. Then serialisation is T1 T3 T2 Sankaranarayanan P.N answered Nov 16, 2014 1 flag: ✌ Low quality (RahulVerma3 “blind write is there”) Sankaranarayanan P.N comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes (A) T1→T3→T2 T1 can complete before T2 and T3 as there is no conflict between Write(X) of T1 and the operations in T2 and T3 which occur before Write(X) of T1 in the above diagram. T3 should can complete before T2 as the Read(Y) of T3 doesn’t conflict with Read(Y) of T2. Similarly, Write(X) of T3 doesn’t conflict with Read(Y) and Write(Y) operations of T2. akhilraj answered Apr 29, 2022 akhilraj comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes CHECK FOR VIEW SERIALIZABILITY HERE . NOT CONFLICT SERIALIZABILITY CHECK FOR CONFLICT SERIALIZABILITY IS MAJOR MISCONCEPTION HERE . THIS IS CORRECT ANSWER OF THIS QUESTION WITH CORRECT CONCEPT . Patel_And_Patel answered 4 days ago Patel_And_Patel comment Share Follow 0 reply Please log in or register to add a comment.