written 8.0 years ago by | modified 2.9 years ago by |
Mumbai University > Information Technology > Sem 5 > Advanced Database Management System
Marks: 10M
Year: Dec 2015
written 8.0 years ago by | modified 2.9 years ago by |
Mumbai University > Information Technology > Sem 5 > Advanced Database Management System
Marks: 10M
Year: Dec 2015
written 8.0 years ago by | • modified 8.0 years ago |
WRITE Phase: - If written data from local copy to database. The main strength of this technique is to incur minimum overhead to commit a transaction. This technique deals with timestamp of three phases & READ-SET & WRITE-SET of a transaction, where read set implies all the data that are to be read & WRITE- SET denoted all the data items that are to be updated. The validation for two transactions against T2 is done in three steps, which are :-
Condition 1:- Transaction T2 should complete its WRITE operation before READ operation of T1.
Condition 2:- Check if it starts its write operation only after T2 ends its WRITE operations & the READ SET of T1 has no item in common with WRITE-SET of T.
Condition 3:- The write set of T2 should not have any items in common with both READ-SET & WRITE-SET of T1. In addition, T2 should complete its all READ Operation before T1 starts its READ operations.
E.g.:-
T1 | T2 | Comment |
---|---|---|
READ (A) | ||
READ (A) | ||
READ (B) | T1 Complete its read & update | |
UPDATE (A) | operation in disjoint manners, | |
UPDATE (B) | Thus validating comment. | |
VALIDATE (A,B) | ||
WRITE (A) | ||
WRITE (B) | ||
COMMIT | ||
READ (B) | ||
ABORT T2 |
Let’s modify above table:-
T1 | T2 | COMMENT |
---|---|---|
READ(A) | Read & Update operations of | |
READ(B) | T1 first take place where | |
UPDATE(A) | * * | Update is done on local copy. |
UPDATE(B) | ||
READ(A) | Read & Update & validation | |
READ(B) | Operations of T2 take place, | |
UPDATE (A) | These two update operations | |
UPDATE (B) | Of T2 are disjoint operations. | |
VALIDATE (A,B) | ||
VALIDATE (A,B) | Validation of T1 is done. | |
WRITE (A) | It satisfies second thus, these | |
WRITE (B) | Two transactions are | |
COMMIT | Sailable & can commit with- | |
WRITE (A) | Out hesitation. | |
WRITE (B) | ||
COMMIT | ||