Database Reference
In-Depth Information
A transaction is a bundle of one or more SQL statements that together form a logical unit
of work. The SQL statements that form the transaction are typically closely related and
perform interdependent actions. Each statement in the transaction performs some part of a
task, but all of them are required to complete the task. Grouping the statements as a single
transaction tells the DBMS that the entire statement sequence should be executed atomic-
ally—all of the statements must be completed for the database to be in a consistent state.
We use the term transaction to indicate a meaningful atomic operation, that may or may not
be composite. Successful termination is called commitment and a successful transaction is
assumed to terminate with a commit operation. After a successful commit operation, the
changes that the transaction has made to the system state are guaranteed to persist. This is
the durability property of transactions. A transaction management system must be crash-re-
silient in order to enforce the property of atomicity of transactions: either all or none of the
operations of a transaction are carried out. If a transaction has not been committed it cannot
be assumed that all its operations are complete. When the system restarts after a crash it
must be able to roll back (undo) the effects of any transactions that were uncommitted at
the time of the crash. This is called aborting a transaction. A transaction is defined to end
with a commit or an abort operation. transaction processing
Search WWH ::




Custom Search