ACID
Stands for "Atomicity, Consistency, Isolation, Durability." The ACID acronym defines four characteristics a database must have to ensure data integrity. Specifically, these qualities apply to database operations that write data to the database. Examples include inserting, updating, and removing records.
The four ACID elements are described below:
1. Atomicity
Atomicity guarantees each transaction is an "all-or-nothing" event. In other words, it succeeds or fails completely. Atomic operations prevent data corruption by disallowing partial transactions. If an operation cannot be completed, it is "rolled back" to the previous state, as if it never happened.
2. Consistency
Consistency is the assurance that only valid data is written to a database. For example, a database will not accept invalid transactions or unrecognizable data. Additionally, it may use a "doublewrite buffer" that temporarily stores new transactions. If the database or host system crashes unexpectedly, the data can be restored from the buffer.
3. Isolation
Isolation ensures each transaction is handled individually. Some databases read and write data several times per second, which may require concurrent transactions. Even when transactions take place at the same time, they can still be isolated from each other. For example, if one operation fails, it will not affect others taking place at the same time. Isolation is also essential for database security since it prevents the data in one transaction from being visible to another.
4. Durability
Durability guarantees data will be stored once a transaction has been processed or "committed" to the database. It requires that data is written to non-volatile memory so that transactions are not lost if an application crashes or a power outage occurs.
While database software can help ensure database durability, hardware is also important. For example, a RAID storage configuration can provide redundancy if a storage device fails. A UPS battery backup can prevent data loss by maintaining electrical power if the primary power source is unavailable.
NOTE: "Acid" (lowercase) is a web browser test that checks browser support for specific HTML tags and CSS rules. The most recent test, Acid3, was produced by the Web Standards Project group in 2008.