The Gateway to Computer Science Excellence
0 votes
43 views

In this answer, how is the number of conflict equivalent schedule equal to T1->T2 equal to 1(How is it being calculated). And how is the number of conflict equivalent schedule equal to T2->T1 being calculated??It is very confusing please Help!!!!!

in Databases by (63 points) | 43 views
0

 

T1: r1(X), w1(X), r1(Y), w1(Y)

 

T2: r2(Y), w2(Y), r2(Z), w2(Z) 

finding conflict equivalents from T1 to T2 ===> it means first T1 started then T2.

conflict serializable schedule means, your schedule should conflict equivalent to serial schedule.

what are the conflicting operations between T1 and T2 ?

i) T1 :  R(y) with T2: W2(y)

ii) T1 :  W1(y) with T2: R2(y) and 

iii) T1 :  W1(y) with T2: W2(y)

So, ( you are interested in T1 -> T2 ) ===> T1 :  W1(y) should be before T2: R2(y) , so howmany combinations remaining can have ?

only one schedule you can have :- r1(X), w1(X), r1(Y), w1(Y), r2(Y), w2(Y), r2(Z), w2(Z).

 

i know, i explained easy one, try to get the other part, read the answer 2-3 times if you didn't get it !

after that Still if you didn't get comment !!

0
Why can't we swap R1(x)/W1(x) with R2(z)/W2(z), they are non conflicting right??? And non conflicting operations can be swapped right???

And for T2->T1 I am not able to get it even after reading it 10-15 times..Please Help
0

Why can't we swap R1(x)/W1(x) with R2(z)/W2(z), they are non conflicting right??? And non conflicting operations can be swapped right???

write your schedule, i will tell where you are wrong.

0
suppose we write r2(Z), w2(Z), r1(Y), w1(Y), r2(Y), w2(Y),r1(X), w1(X).....
0
This might be completely wrong and foolish!!! But I want to understand the concept properly.
0
first point is :- in a transaction, all operations sequence should be preserved !

So, r2(Z) should be after W2(y) and W2(Y) should be after R2(y)

Now check howmany schedules you are getting
0
Ok, So there will be 1 schedule for T1->T2, but can't understand what you have done for T2->T1....

Please log in or register to answer this question.

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
50,647 questions
56,497 answers
195,491 comments
100,822 users