Transaction - a logical unit of work that comprises one or more SQL statements executed by a single user |
A transaction begins with the user's first executable SQL statement |
A transaction ends when it is explicitly committed or rolled back |
Transactions provide the database user or application developer with the capability of guaranteeing consistent changes to data, as long as the SQL statements within a transaction are grouped logically |
A transaction should consist of all of the necessary parts for one logical unit of work - no more and no less |
Data in all referenced tables are in a consistent state before the transaction begins and after it ends. |
Transactions should consist of only the SQL statements that comprise one consistent change to the data |