Main Page | See live article | Alphabetical index

ACID

In databases, ACID stands for Atomicity, Consistency, Isolation, and Durability. They are considered to be the key transaction processing features of a database management system, or DBMS. Without them, the integrity of the database cannot be guaranteed.

In the context of databases, a single logical operation on the data is called a transaction. A transfer of funds from one account to another is considered a transaction, for example, even though it might consist of multiple tasks (debiting one account and crediting another). The ACID properties guarantee that such transactions are processed reliably.

Implementing the ACID properties correctly is not simple. Processing a transaction often requires a number of small changes to be made, including updating indexes that are used by the system to speed up searches. This sequence of operations is subject to failure for a number of reasons; for instance, the system may have no room left on its disk drives.

ACID suggests that the database be able to perform all of these operations at once. In fact this is difficult to arrange. There are two popular families of techniques: Write ahead logging and Shadow paging. In both cases, lockss must be acquired on all information that is read and updated. In write ahead logging, atomicity is guaranteed by ensuring that all REDO and UNDO information is written to a log before it is written to the database. In shadowing, updates are applied to a copy of the database, and the new copy is activated when the transaction commits. The copy refers to unchanged parts of the old version of the database, rather than being an entire duplicate.

In distributed transactions, two-phase commit is typically applied to ensure that each participant on the transaction agree on whether the transaction should be committed or not.

Care must be taken when running transactions in parallel. Two phase locking is typically applied to guarantee full isolation.


The ACID concept is described in ISO/IEC 10026-1:1992 Section 4.\n