Consider the following schedule:
S = (2,W,x),(1,W,z),(1,W,x),C1,(2,W,y),(2,R,y),(3,W,z)
whereC1means commit of 1st transaction.
Triple(i, W/R,x) means transaction i writes/reads item x,
Open in App
Solution
Check for View serializablity:
Transaction 2 is reading item m which is written by trans 3, hence, In the view equivalent serial schedule, trans 2 must appear after (not necessarily immediately) trans 3. (3 →2)
Transaction 1 is doing final write of item x which is also written by trans 2, hence, in the view equivalent serial schedule, trans 1 must appear after (not necessarily immediately) trans 2.
(2→1) Transaction 3 is doing final write of item z which is also written by trans 1, hence, in the view equivalent serial schedule, trans 3 must appear after (not necessarily immediately) Trans 1. (1→3) But now we have a contradiction. 3→2→1 but also 1→ 3.
Hence, not view serializable.