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

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

Marks: 10M

Year: Dec 2015

1 Answer
0
7views
  • It maintains local copy of items to make operation easy.
  • Its validation is true, and then updated values are written in database.
  • READ PHASE: - If transaction T issues a READ operation, then it reads the data items & stores it in private workplace.
  • Validation phase:- In this phase, its checked that the value of data item A, which the transaction T reach, 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 database & transaction commits.
  • 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    
     
Please log in to add an answer.