- means that any changes to data made during a transaction are all-or-nothing. Either all the changes are applied, or none of them are. If a program makes a bunch of modifications and then crashes, the database won't be partially modified, potentially leaving the data in an inconsistent state; instead all the changes will be forgotten. That's bad, but it's better than having a partially-applied modification put the database into an inconsistent state.
- means that each transaction executes a valid transformation of the database state. Some databases provide a variety of consistency checks in the database or language; for example, a relational database constraint columns to be of particular types and can enforce relations across tables. Viewed more generally, atomicity and isolation make it possible for applications to provide consistency.
- means that two programs or threads running in two different transactions cannot see each other's changes until they commit their transactions.
- means that once a transaction has been committed, a subsequent crash will not cause any data to be lost or corrupted.
Saturday, July 24, 2010
The term ``transaction'' has a specific technical meaning in computer science. It's extremely important that the contents of a database don't get corrupted by software or hardware crashes, and most database software offers protection against such corruption by supporting four useful properties, Atomicity, Consistency, Isolation, and Durability.
In computer science jargon these four terms are collectively dubbed the ACID properties, forming an acronym from their names.
Definitions of the ACID properties are: