in Databases
967 views
1 vote
1 vote

in Databases
967 views

4 Comments

S1 and S2 are view equivalent then those must satisfy conflict equivalent

every view equivalent are not satisfy conflict equivalent

but if you know that it's a conflict equivalent then it's must satisfy view equivalent

0
0

@Magma

Sorry, I mis-used the terms, i will update it !

0
0

My statement also convey same meaning., right?

S1 and S2 are view equivalent then those must satisfy conflict equivalent 

S1 and S2 are conflict equivalent then those must satisfy view equivalent

there's a subtle difference

0
0

1 Answer

1 vote
1 vote

LightboxFor any 2 schedule S1 and S2 to be View Equivalent 3 steps to be followed:

Step 1: Initial Reads: This means that the data item is been read from the database directly.

All the initial reads of all the transactions of Si schedule should be same as  all the initial reads of all the transactions of Sj schedule. For example: If R1(X) and R2(Y) of S1 are initial reads then in S2 also  R1(X) and R2(Y) should be initial reads.

Step 2: Updated reads: This means that the data item is been read from the updated data from the write transaction just above this read.

All the updated reads of all the transactions of Si schedule should be same as  all the updated reads of all the transactions of Sj schedule. For example: If R1(X) reads after W2(X) and R2(Y) reads after W3(Y) of S1 are updated reads then in S2 also  R1(X) should read after W2(X) and R2(Y) should  read after W3(Y)

Step 3: Final Write: The transaction which is writing the data item at last  in any schedule.

All the final write of all the transactions of Si schedule should be same as  all the final write of all the transactions of Sj schedule. For example: If W1(X) writes data item X at last and W2(Y) writes data item Y at last of S1   then in S2 also  W1(X) writes data item X at last and W2(Y) writes data item Y at last.

Here in the given example 

Considering S1 and S2: 

Initial reads: no initial reads in S1 and S2--------------------no problem

Updated Reads: In S1 - R3(X) reads after W2(X)and in S2 - R3(X)  reads after W1(X)------------ not samesame 

Final Write: In S1 - W2(X) and in S2 - W2(X)-------------------same

Therefore S1 and S2 are not view equal

so  not view serializable also.

 

Considering S3 and S4: 

Initial reads:  in S3- R1(X) and S4- R1(X)--------------------same

Updated Reads: In S3 and S4 not present----------------no problem

Final Write: In S3 - W1(X) and in S4 - W2(X)-------------------not same 

Therefore S3 and S4 are not  view equal 

so not view serializable also

so option b and d are correct

edited by

4 Comments

only b and d are correct.
0
0
Got confused.

Now please recheck the solution.
0
0
its fine now:)
0
0

Related questions

0 votes
0 votes
0 answers
1
mani8466 asked in GATE Sep 20, 2018
156 views
mani8466 asked in GATE Sep 20, 2018
156 views
0 votes
0 votes
2 answers
2
mani8466 asked in GATE Sep 19, 2018
241 views
mani8466 asked in GATE Sep 19, 2018
241 views
0 votes
0 votes
1 answer
3
mani8466 asked in GATE Sep 19, 2018
155 views
mani8466 asked in GATE Sep 19, 2018
155 views
0 votes
0 votes
0 answers
4
mani8466 asked in GATE Sep 19, 2018
137 views
mani8466 asked in GATE Sep 19, 2018
137 views