0
2.9kviews
Explain in short the concurrency control in distributed database.

Mumbai University > Information Technology > Sem 5 > Advanced Database Management System

Marks: 10M

Year: May 2016

1 Answer
0
21views

It maintains local copy of items to make operations easy. Concurrency control technique comprises following three phases. If validation is true, then updated values are written to the database.

  • READ Phase :- If transactions T issues a READ operation, then it needs the data item and stores it in private work place.

  • VALIDATION Phase:- In this phase , it’s checked that the value of data item A, which the transaction T reads, has been changed by some other transaction while T is busy with updating its local copy holding the value A. This checking ensures serializability of transaction. If the validation is true, then updated data on local copy are written in the data base and transaction committee.

  • WRITE Phase:- It writes data from local copy to data base. The main strength of this technique is to incur minimum overhead to commit a transaction. This technique deals with times to m p of three phases and READ_SET and WRITE_SET of a transaction, where READ_SET implies all the data that are to be read and WRITE_SET denotes all the data items that are to be updated. The validation for two transactions T1 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 T1 starts it’s WRITE operation only after T2 ends its WRITE operations and the READ_SET of T1 has no item in common with WRITE_SET of T8.

    Condition 3:- The WRITE_SET of T2 should not have any items in common with both READ_SET and WRITE_SET of T1. In addition, T2 should complete its all READ operations before T1 starts its READ operations.

Example:-

T1 T2 Comments
READ(A)    
  READ(A)  
READ(B), UPDATE(A), UPDATE(B), VALIDATE(A,B), WRITE(A)   T1 completes it’s read and update operation in disjoint manner, thus validating comment
WRITE(B),COMMIT    
  READ(3) Violate conditions
  ABORT T2  

Let’s modify above table:-

T1 T2 Comment
READ(A), READ(B), UPDATE(A), UPDATE(B)   Read and update operations of T1 first takes place where update is done on local copy
  READ(A), READ(B), UPDATE(A), UPDATE(B), VALIDATE(A,B) Red and update and validation operations of T12 takes place , these two update operations ofT2 are disjoint operations
VALIDATE(A,B)   Validation of T1 is done
WRITE(A), WRITE(B), COMMIT WRITE(A), WRITE(B), COMMIT It satisfies condition2. Thus these two transactions are serializable and can commit without hesitation
Please log in to add an answer.