Thursday, August 9, 2012

Database ACID Rules

Relational databases support transactions. ACID is a set of properties that the database should support to ensure that transactions are processed reliably. Below is the short description of ACID properties.

Atomicity means that a transactions either happens or does not happen i.e. all statements of the transaction are executed (commit) or none are executed (rollback).

Consistency means that referential integrity of the database is intact at any point of time. So the database is stable before and after the transaction, even if the transaction fails.

Isolation keeps the concurrent transactions separate and independent. The row associated to the transaction cannot be accessed by any other transaction until the transaction completes.

Durability means that the committed changes survive permanently (in non volatile memory) in the database even in case of system crash (or power failure or hardware failure).

Databases support multiple levels of isolation. We will discuss the isolation levels supported by SQL Server 2008 in subsequent posts.

No comments:

Post a Comment