Write about Concurrency Control ?

The coordination of the simultaneous execution of transactions in a multi user data base system is known as concurrency control.

the objective of concurrency control is to ensure the Serviceability of transactions in a multi –user data base environment.

The 3–problems are

  1. Lost updates
  2. Uncommitted data
  3. Inconsistent retrievals
1.lost updates:

The problem occurs when two concurrent transactions T1 & T2 are updating the same data element & one of the update is lost.

Ex; T1 & T2  are two transactions update the account.

account contains 1000rs .

T1 deposit 2000 Rs and at the same time,

T2 deposit 3000 Rs either of the following is occur.

lost updates


2.Uncommitted data : 

 T1 & T2 transactions are executed concurrently & the first transaction (T1) is  rolled back after the second transaction (T2) has already accessed the uncommitted data.

Thus violate the isolation property of transaction .

Ex :

T1 : purchase 100 units.

T2 : sell 30 units.

Correct execution
T1
Read
35
T1
Purchase 35+100
135
T1
Write
135
T1
Roll back
35
T2
Sell 35-30
30
T2
Write
5
Uncommitted data problem
T1
Read
35
T1
Purchase
135
T1
Write
135
T2
Read
135
T2
Sell
30
T1
Roll back
35
T2
Write
105

3.Inconsistent retrievals 

this occur when a transaction access data base before & after another transaction finish working with such data.

Related

DBMS 2764203938978342218

Post a Comment

emo-but-icon

item