0% completed
Concurrency control is a mechanism used in databases to ensure the correct execution of transactions when multiple users or processes are accessing and modifying the database simultaneously. It ensures:
Without proper concurrency control, the following issues can arise:
Dirty Reads:
Lost Updates:
Nonrepeatable Reads:
Phantom Reads:
Databases use various techniques to manage concurrency and prevent the issues mentioned above:
Assumes conflicts are rare and allows transactions to execute without locks.
Before committing, the database checks for conflicts:
Example:
A deadlock occurs when two or more transactions wait for each other’s locks, preventing progress.
Banking Systems:
E-Commerce:
Collaborative Tools:
.....
.....
.....