Concurrency Control. WXES 2103 Database. Content. Concurrency Problems Concurrency Control Concurrency Control Approaches. Concurrency Problems. Data integrity and consistency problem may arise when several transactions are processed simultaneously (multi-user DB environment)
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Assume that customer balance (Bal) is 500. And 2 transaction T1 and T2 attempt to update the balance at the same time.
The scheduler below shows incorrect sequence leading to lost updates
This serial execution yields the correct results Balance = 400
1. exclusive (X) mode. Data item can be both read as well as written. X-lock is requested using lock-X instruction.
2. shared (S) mode. Data item can only be read. S-lock is requested using lock-S instruction.
Locking as above is not sufficient to guarantee serializability — if A and B get updated in-between the read of A and B, the displayed sum would be wrong.
Next Class – Distributed Database