Transactions have four essential attributes:
atomicity, consistency, isolation, and durability (known as the ACID attributes).
■ Atomicity The work cannot be broken into smaller parts. Although a transaction
might contain many SQL statements, they must be run as an all-or-nothing proposi-
tion, which means that if a transaction is half complete when an error occurs, the work
reverts to its state prior to the start of the transaction.
■ Consistency A transaction must operate on a consistent view of the data and must
leave the data in a consistent state. Any work in progress must not be visible to other
transactions until the transaction has been committed.
■ Isolation A transaction should appear to be running by itself; the effects of other on-
going transactions must be invisible to this transaction, and the effects of this transac-
tion must be invisible to other ongoing transactions.
■ Durability When a transaction is committed, it must be persisted so it will not be lost
in the event of a power failure or other system failure. Only committed transactions are
recovered during power-up and crash recovery; uncommitted work is rolled back.