1 votes 1 votes Is the following schedule view serializable? T1 T2 T3 R(A) R(A) W(A) W(A) W(A) Databases view-serializability + – Sushant Gokhale asked Feb 5, 2017 • edited Jul 11, 2019 by Cristine Sushant Gokhale 1.0k views answer comment Share Follow See all 12 Comments See all 12 12 Comments reply Show 9 previous comments Kaushik.P.E commented Feb 5, 2017 reply Follow Share @dulqar T1 must start first and T2 must end first. As they perform first read and last write on A. But if that order is maintained only possible serial schedule is T1->T3->T2 (T1 and T3 contain only one operation) and the given schedule is not view equivalent to it as producer consumer order is not maintained for A. 1 votes 1 votes Dulqar commented Feb 5, 2017 reply Follow Share @Kaushik.P.E Got it . Thank you :) 0 votes 0 votes Kaushik.P.E commented Feb 5, 2017 reply Follow Share For serial schedule T1 -> T3 -> T2 operations will be R1(A) W3(A) R2(A) W2(A) W2(A) reads values written by 3. Given schedule R1(A) R2(A) W2(A) W3(A) W2(A). does not read value wriiten by 3. This makes it more clear. 1 votes 1 votes Please log in or register to add a comment.
Best answer 0 votes 0 votes From initial reads, we can derive that T1-->T2-->T3 And from final write, we can say, T3-->T2. No updated reads here. There is conflict T2-->T3 and T3-->T2. so, not view serializable. Lucky sunda answered Feb 5, 2017 • selected Feb 5, 2017 by Sushant Gokhale Lucky sunda comment Share Follow See all 7 Comments See all 7 7 Comments reply Sushant Gokhale commented Feb 5, 2017 reply Follow Share for final write, only single dependency i.e. T3 -> T2 but your answer is correct :) 0 votes 0 votes Lucky sunda commented Feb 5, 2017 reply Follow Share Oh yes.I have done mistake there. Corrected.Thanks :) 0 votes 0 votes Lucky sunda commented Feb 5, 2017 reply Follow Share @ Dulqar No..I am not checking cycle in precedence graph. You are correct that If loop and IF blind write then we should check for view rules satisfied or not. For view serializabilty, there should be no cycle in polygraph. // I find this method too lengthy. But if we can get a schedule following initial reads, updated reads and final writes, then it is surely view serializable .This method is simpler than polygraph method. 1 votes 1 votes Kaushik.P.E commented Feb 5, 2017 reply Follow Share The serial schedule you've assumed is wrong. There's only one data item. So from intial read and final write schedule should be checked with is T1->T3->T2 and not T1->T2->T3. For serial schedule T1 -> T3 -> T2 operations will be R1(A) W3(A) R2(A) W2(A) W2(A) reads values written by 3. Given schedule R1(A) R2(A) W2(A) W3(A) W2(A). does not read value wriiten by 3. So its not view equivalent to it. Hence its not view serilizable. 0 votes 0 votes Lucky sunda commented Feb 5, 2017 reply Follow Share I have said this:From initial reads, we can derive that T1-->T2-->T3. Only from initial reads. 0 votes 0 votes Kaushik.P.E commented Feb 5, 2017 reply Follow Share why are you considering both the reads? Only one data item A. * T1 performs first read * T2 perform last write. T1 and T2 contains only one instruction. So schdule to be checked with T1-T3-T2. * now check for producer consumer relationship. 0 votes 0 votes Kaushik.P.E commented Feb 5, 2017 reply Follow Share I think I misunderstood your answer. I thought you are following producer consumer method(view equivalence definition). sorry.. 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes The schedule is not View serializable: First read: T1 Last write: T2 Read after write: None Write after Write: T2->T3 and T3->T2 since there is a cycle so it is not View serializable. vishwa ratna answered Feb 5, 2017 vishwa ratna comment Share Follow See 1 comment See all 1 1 comment reply Sushant Gokhale commented Feb 5, 2017 reply Follow Share WAW is not considered in view serializability except the last write dependency i.e T3 should come before T2 for W(A) 0 votes 0 votes Please log in or register to add a comment.