The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+4 votes
721 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 (16.8k points)
retagged by | 721 views

2 Answers

+3 votes

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

answered by Veteran (27.3k 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 (12.6k 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.


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

28,944 questions
36,792 answers
91,049 comments
34,688 users