The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+17 votes
2.2k views

Consider the following schedule for transactions T1, T2 and T3:

T1 T2 T3
Read(X)    
  Read(Y)  
    Read(Y)
  Write(Y)  
Write(X)    
    Write(X)
  Read(X)  
  Write(X)  

Which one of the schedules below is the correct serialization of the above?

  1. $T1 \to T3 \to T2$
  2. $T2 \to T1 \to T3$
  3. $T2 \to T3 \to T1$
  4. $T3 \to T1 \to T2$
asked in Databases by Veteran (101k points)
edited by | 2.2k views
0
in T3 are they over writing x value with y value ?

3 Answers

+30 votes
Best answer

Answer is option A.

create precedence graph and apply Topological sort on it to obtain 
$T1 \rightarrow T3 \rightarrow T2$

precedence graph

answered by Boss (30.8k points)
edited by
0
Thanks
+1
How to apply topological sort on a precedence graph?
+8 votes

The solution is described here.
            
hence option A is True.

answered by Active (3.5k points)
edited
+6 votes
You can use method of conflict serializability graph or precedence graph Ref: Elmasri Navathe. Then serialisation is T1 T3 T2
answered by Boss (11.5k points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,751 questions
46,766 answers
140,658 comments
58,522 users