GATE CSE
First time here? Checkout the FAQ!
x
+4 votes
626 views
S1: R(A) W(A) W(B)

S2: R(A) W(A) R(B) W(B)

How many view serializable schedules are possible which are not conflict serializable?

(A) 0

(B) 1

(C) 2

(D) 3
asked in Databases by Veteran (15.4k points)  
retagged by | 626 views

2 Answers

+3 votes

I think ans should be 3 view-serializable schedules which are not conflict serializable.

answered by Veteran (25.2k points)  
edited by
@vijay in first schedule R(A) of S2 is reading A from database.
but in S1-->S2, R(A) will read A from W(A) of S1.
hence first one is not view serializable. same with remaining cases.
answer should be zero
^@Anusha, I did not get you properly -

See, for view-serializability, we check following three-point-

1. Initial read

2. W-R conflict pair.

3. Last write

right??

Now tell .. which point violates here ??
i am sorry for not being clear,
i was talking about W-R pair.
in the first schedule mentioned by u, R(A) of S2 is --> reading A from database isnt it?
lets assume it is serializable as S1-->S2
now in S1-->S2, R(A) of S2 is --->reading A from W(A) of S1.
i mean to say there is W-R conflict pair W1(A) - R2(A)  in serial schedule S1-->S2, but it is not present in original schedule..
as we know W-R conflicts in original schedule= W-R conflicts in serialized schedule.
after serializing we get extra W-R conflict W1(A)-R2(A)

let me know if am not being clear yet
yes, sorry..:p. I got you now.

Actually, I did not know this point.... thanks ..: )

Let me search about this or you can also help me with any reference to this particular point.. thanks in adv.

Agree [email protected] Anusha Motamarri, asnwer is 0 and its not 3.

0 votes

0 view serial schedules which are not conflict 

becauseS1=r1(a)w1(a)w1(b)

S2=r2(a)w2(a)r2(b)w2(b)

w1(a) in S1 is not executed after r2(a) or w2(a) because it is not  serializable.

and same for w1(b) in S1 is not executed after r2(b) or w2(b) it is also not serializable.

if we execute another order it must be a conflict serializable and also view serializable.

answered by Veteran (11.1k points)  
Do you want say that, doesn't Matter if we execute it as T2->T1 or T1->T2 it won't be View Serializable because this schedule is not Serializabl, and we cannot mantain initial read property in both the cases.

What do you mean by

if we execute another order it must be a conflict serializable and also view serializable.

yes,if we execute another order it is conflict as well as view serial schedule
can you show it? i still didn't get it
1.r1(a)r2(a)w2(a)w1(a)w1(b)r2(b)w2(b)

2.r1(a)r2(a)w1(a)w1(b)w2(a)r2(b)w2(b)

3.r1(a)w1(a)r2(a)w2(a)r2(b)w1(b)w2(b)

4.r1(a)w1(a)r2(a)w2(a)r2(b)w2(b)w1(b)

1,2,3,4 are not a schedules

and remaining schedules are S1 after S2(all operations)

S2 after S1.//these are conflict as well as view.


Top Users Sep 2017
  1. Habibkhan

    7096 Points

  2. Warrior

    2574 Points

  3. Arjun

    2412 Points

  4. rishu_darkshadow

    2402 Points

  5. A_i_$_h

    2204 Points

  6. nikunj

    1980 Points

  7. manu00x

    1846 Points

  8. makhdoom ghaya

    1760 Points

  9. Bikram

    1744 Points

  10. SiddharthMahapatra

    1718 Points


26,115 questions
33,691 answers
79,843 comments
31,098 users