Transaction Processing
Transaction Processing
Active, the initial state; the transaction stays in this state while it is executing
Partially committed, after the final statement has been executed.
Failed, after the discovery that normal execution can no longer proceed.
Aborted, after the transaction has been rolled back and the database
restored to its state prior to the start of the transaction. Two options after it has
been aborted:
restart the transaction -- only if no internal logical error
kill the transaction
Committed, after successful completion
Properties of Transactions
ACID, properties
Atomicity: The ‘all or nothing’ property. A transaction is
an indivisible unit that is either performed in its entirety or
is not performed at all.
Consistency: A transaction must transform the database
from one consistent state to another consistent state. It
is the responsibility of both the DBMS and the
application developers to ensure consistency.
Properties of Transactions
ACID, properties
Isolation: Transactions execute independently of one
another. In other words, the partial effects of
incomplete transactions should not be visible to other
transactions.
Durability The effects of a successfully completed
(committed) transaction are permanently recorded in
the database and must not be lost because of a
subsequent failure.
Example of Fund Transfer
Example of Fund Transfer