ACID properties
ACID is widely accepted as a framework that a transaction must meet to be defined as a proper or true transaction. These properties ensure database transactions are reliable and consistent, serving as the criteria for a unit of work to be considered a transaction:
- Atomicity implies that all the operations in a transaction are either performed successfully or not at all, meaning that if one operation in a transaction fails, the entire transaction is rolled back.
- Consistency ensures that all the data in a database is consistent with the results of the transaction.
- Isolation prevents transactions from interfering with each other. The implication of this property is that two transactions will not see each other's changes until both transactions have been committed.
- Durability ensures that once a transaction is committed, the changes are permanent. In this way, changes are not lost even if the database crashes.
Let's look at these concepts...