TOPICS (Click to Navigate)
Thursday, 14 April 2016
What is concurrency control in database transactions
The process of executing many different simultaneous (concurrent execution) transactions by complying with ACID properties in a multi-user database system is called as concurrency control.
Executing transactions in serial order, ie., one after the other maintains the integrity of data. All transactions that are executed serially will show a safe, consistent, durable database. But the major disadvantage is the time. Executing individual transactions in serial order consumes lot of time and reduces the transaction throughput. Hence, we need to execute multiple transactions simultaneously.
Assume that you are executing two transactions T1 and T2 simultaneously. Also assume that T1 transfers money from account A to account B and T2 withdraws money from account C. If we execute T1 and T2 simultaneously, the execution will not harm the consistency of the database because both transactions are working on different data items.
Let us suppose T1 transfers money from account A to account B and T2 withdraws money from account B. What would happen if we execute T1 and T2 simultaneously? As both transactions are working (writing) on the same data items (in this case, both T1 and T2 changes the value of data item B), whichever writes later will be the final value of B which is not correct.
From the above discussion we would understand that, the simultaneous transactions have to be handled with extra care to ensure the integrity of the data and the database if they read or write same data items. The process that is used to ensure this type of safe execution of transaction is called concurrency control.
Go to Transaction Management in DBMS home page
SQL Exercises for Beginners / Simple SQL Exercises with Answers / Solved SQL exercises / SQL solved exercises with simple conditions / So...
Advanced concepts in DBMS Advanced Database Topics (Click on the links to navigate) Advanced Concepts in D...
Set of solved exercises in Normalization / Normalization Solved Examples / How to find candidate keys, and primary keys in database? /...
Query Processing in DBMS / Steps involved in Query Processing in DBMS / How is a query gets processed in a Database Management System? / Q...