0% found this document useful (0 votes)
113 views

Concurrency Control

Concurrency control manages simultaneous database operations to prevent conflicts and ensure accuracy. It addresses issues like lost updates where one transaction's update is overwritten by another transaction. Concurrency control methods include lock-based protocols, two phase locking protocol, and timestamp-based protocols to apply isolation through mutual exclusion of conflicting transactions and preserve consistency.

Uploaded by

Aashu Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views

Concurrency Control

Concurrency control manages simultaneous database operations to prevent conflicts and ensure accuracy. It addresses issues like lost updates where one transaction's update is overwritten by another transaction. Concurrency control methods include lock-based protocols, two phase locking protocol, and timestamp-based protocols to apply isolation through mutual exclusion of conflicting transactions and preserve consistency.

Uploaded by

Aashu Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

What is Concurrency Control?

• Concurrency control is the procedure in DBMS for


managing simultaneous operations without conflicting
with each another.
• Concurrent access is quite easy if all users are just reading
data.
• It ensures that Database transactions are performed
concurrently and accurately to produce correct results
without violating data integrity of the respective Database.
• DBMS Concurrency Control is used to address such
conflicts, which mostly occur with a multi-user system
Potential problems of Concurrency
• Temporary Update Problem
• Incorrect Summary Problem
• Lost Update Problem
• Unrepeatable Read Problem
• Phantom Read Problem
.
Temporary Update Problem: 
• Temporary update or
dirty read problem
occurs when one
transaction updates an
item and fails. But the
updated item is used by
another transaction
before the item is
changed or reverted
back to its last value. 
Incorrect Summary Problem: 
• Consider a situation,
where one transaction is
applying the aggregate
function on some records
while another transaction
is updating these records.
The aggregate function
may calculate some values
before the values have
been updated and others
after they are updated.
Lost Update Problem: 
• In the lost update
problem, an update
done to a data item by a
transaction is lost as it is
overwritten by the
update done by another
transaction. 
Unrepeatable Read Problem
• The unrepeatable
problem occurs when
two or more read
operations of the same
transaction read
different values of the
same variable
Phantom Read Problem
• The phantom read
problem occurs when a
transaction reads a
variable once but when
it tries to read that
same variable again, an
error occurs saying that
the variable does not
exist.
Why use Concurrency method?
• To apply Isolation through mutual exclusion
between conflicting transactions
• To resolve read-write and write-write conflict issues
• To preserve database consistency through
constantly preserving execution obstructions
• The system needs to control the interaction among
the concurrent transactions. This control is achieved
using concurrent-control schemes.
• Concurrency control helps to ensure serializability
Concurrency Control Protocols
• Lock-Based Protocols
• Two Phase Locking Protocol
• Timestamp-Based Protocols
• Validation-Based Protocols

You might also like