Awesome q2a theme
0 votes
22 views

Are they view serializable or not ?

S1: r1(y), r2(x), r2(y), r3(y), w2(x), w1(y), w3(x), r1(x)

S2: r2(x), r3(z), w3(x), w2(x), w2(y), w3(z), r1(x), r1(y), w1(x), w1(y)

S3: r1(x), r2(x), r3(y), w1(x), r2(z), r2(y), w2(y), w1(z)

(Note: S1 is Conflict serialiazable hence View serializable also but I need to check directly how it VSS )

in Databases by (83 points) | 22 views
0
In S1,  if you don’t want to use the conflict serializability concept

then

you can check if the given schedule is view equivalent to its serial schedule or not.

if view equivalent to serial schedule then view serializable otherwise not view serializable.

1 Answer

+1 vote
Best answer

$\text{S1 is view serializable,}$ 

Starting from T2, initial read of x and y are preserved and are read from database. Then in T3 initial read of y is preserved and also read from DB and T1 is not writing x so final write is also preserved. Finally executing T1 initial read of Y is preserved and final write of y is preserved, also r1(x) is reading value updated by T3 and in serial schedule $T2 \rightarrow T3 \rightarrow T1$ r1(x) is reading value updated by T3.

 

$\text{S2 is not view serializable,}$

Starting from T2, initial read of x is from DB. hence T2 should come before T1 and T3 both as both are updating value of x. T1 should come at last because of final write of x as both T2 and T3 are writing on x. This tells us $T2 \rightarrow T3 \rightarrow T1$ might be view equivalent to S2 but then the problem is T1 will read value of x written by T3 and not T2 hence the contradiction. So there is no view equivalent serial schedule for S2.

As both T1 and T2 are reading value of x and T1 is later updating the value of x so T2 must appear before T1 So that it may not read value of x updated by T1. T3 is reading y from DB so T3 must execute before T2 as T2 is later updating y. 

This gives us serial schedule $T3 \rightarrow T2 \rightarrow T1$

Starting from T3 initial read of y is preserved. Then in T2 initial read of x,z and y is also preserved also T2 is finial writing y. then finally T1 is executed where it is reading value of x which is from DB and final write of x and z is also preserved.

Hence, $\text{S3 is view serializable schedule.}$

by (153 points)
selected ago by
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Oct 2019
  1. GAITONDE

    410 Points

  2. Satbir

    317 Points

  3. Rudr Pawan

    163 Points

  4. srestha

    136 Points

  5. Mk Utkarsh

    127 Points

  6. Debapaul

    94 Points

  7. chandrikabhuyan8

    83 Points

  8. Shaik Masthan

    79 Points

  9. Verma Ashish

    77 Points

  10. !KARAN

    74 Points

Monthly Top User and those within 60% of his/her points will get a share of monthly revenue of GO subject to a minimum payout of Rs. 500. Current monthly budget for Top Users is Rs. 450.
1,680 questions
1,089 answers
4,557 comments
89,591 users