in Databases
501 views
0 votes
0 votes

 

I am not getting that due to Write(A) in T1 and Read(A) in T2 , I will have an edge from T1 to T2 , and then due to Write(B) in T1 and then Read(B) in T1 , we will have an arrow from T2 to T1 , hence a cycle is formed so it should be non-conflict serializable , so why is it conflict serializable , plz correct me where am I wrong ?

in Databases
501 views

2 Answers

0 votes
0 votes

basically we always see the conflict instruction of a transition with other transition operation below that operation . so first edge will be from t to t2. just see the first instruction of t1 with all the other instruction of t2 as all instruction are below it . so an edge . now as there is an edge from t1-t2 not see again t1-t2 because putting one edge is as good as putting two edges. now we have to check the t2-t1 edge . take first instruction of t2 and check for conflict for all other instructions in t1 below it . there is no conflict both are working on difrent data item ,. same for 2 intsruction . 3*4 are the last instruction so they can never conflict with any other as no operation of t1 is blow it . 

0 votes
0 votes
Conflict serializable in given problem like belows ways::

T1----->T2

In first half:

In second half also T1---->T2:

Explanation(For variable A)::

In T1(1st) and T2(sec)::

READ(A) conflict only WRITE(A) but not READ(A)

WRITE(A) conflict READ(A) first then WRITE(A) therefore order is T1--->T2

Explanation(For variable B)::

In T1(First) and T2(sec)::

READ(B) only conflict with WRITE(B) in T2 not READ(B) in T2

WRITE(B) conflict both READ(A) and WRITE(B) in T2

Therefore T1---->T2.
by

Related questions