3
Transactions and their Properties
Transaction is a sequence of operations
that transitions the database from one consistent state
to another,
provided that the transaction is completed successfully,
without interference from other transactions
atomicity guarantees that either all operations within the transaction succeed,
or none of them make any visible changes
consistency is defined by integrity constraints and application semantics
incomplete isolation leads to correctness violations (anomalies)
during concurrent transaction execution
Consistency
Atomicity
Isolation
A transaction is a sequence of operations performed by an application that
transitions the database from one consistent state to another (consistency),
provided that the transaction is completed successfully (atomicity), without
interference from other transactions (isolation).
A correct (consistent) state is defined both by integrity constraints set in the
database and by application semantics.
Full isolation guarantees that application operations are not affected by any
other concurrent transactions. However, when weaker isolation is applied,
a transaction that operates correctly alone may produce incorrect results in
the presence of concurrent transactions, since statements from different
transactions can be interleaved during execution. Such incorrect situations
are called anomalies.
Full isolation is difficult to implement and it often results in lower system
throughput. Since relaxed isolation is standard practice, it is important to
understand its potential implications.
We will cover the fourth ACID property (durability) in Write-Ahead Log
lesson.