A transaction is an inseparable list of database operations which must be executed either in its entirety or not at all. Transactions maintain data integrity and guarantee that the database will always be in a consistent state.
Transactions should either end with a COMMIT or ROLLBACK statement. If it ends with a COMMIT statement, all the changes made to the database are made permanent. If the transaction fails, or ends with a ROLLBACK, none of the statements takes effect.
An example of a transaction is a bank transfer of funds from one account to another. Even though it might consist of multiple individual operations (such as debiting one account and crediting another), it must succeed of fail as a unit, but can never be left in an inconsistent state.
|Glossary of Terms|