Concurrency control |
In computer science -- more specifically, in the field of Databases -- concurrency control is a method used to ensure that database transactions are executed in a safe manner (i.e., without data loss). Concurrency control is especially applicable to database management systems, which must ensure that transactions are executed safely and that they follow the ACID rules, as described in the following section. The DBMS must be able to ensure that only Schedule (computer science)#Serializable, Schedule (computer science)#Recoverable schedules are allowed, and that no actions of committed transactions are lost while undoing aborted transactions.
In computer science -- in the field of concurrent programming (see also parallel programming and parallel computing on multiprocessor machines) -- concurrency control is a method used to ensure that correct results are generated, while getting those results as quickly as possible.
Several algorithms can be used for either type of concurrency control (i.e., with in-RAM data structures on systems that have no database, or with on-disk databases).
== Transaction ACID rules ==
*Atomic (computer science) - Either all or no operations are completed. (Undo) *Database Consistency (computer science) - All database transaction must leave the database in consistent state. *Isolation (computer science) - Transactions cannot interfere with each other. *Durability (computer science) - Successful transactions must persist through crashes. (Redo)
==Concurrency control mechanism==
The main categories of concurrency control mechanisms are:
There are several methods for concurrency control, the majority of which uses Strict 2PL locking:
Lock (computer science) are bookkeeping objects associated with a database object.
There are also non-lock concurrency control methods. All the currently implemented lock-based and almost all the implemented non-lock based concurrency controls will guarantee that the resultant schedule is Schedule (computer science)#Conflict Serializable; however, there are many academic texts encouraging Schedule (computer science)#View Serializable schedules for environments where gains due to improvement in concurrency outstrip overheads in generating schedule plans.
= See also =
= External links =
|
|