SPS Home > Dgreath > RDBMS > Transactions |
TRANSACTIONS |
---|
Every action that adds or modifies table data in a relational database is a transaction.
There are four key concepts that all transactions must comply with (known as the
ACID principles):
Atomic - All operations in a transaction must be atomic, that is, if any one operation fails, the entire transaction must fail. Consistent - While the database may be momentarily inconsistent during a transaction, it must be consistent at both the beginning and at the end. This is the reason for the isolation rule. Isolated - All running transactions must be isolated from outside during execution. This is provided by locking. Durable - Once a transaction has been validated (committed), the effects of the transaction must remain in the database forever. This is the function of the transaction log. The general process entails reading the page containing the record into memory, manipulating it as needed, then writing it back to disc. Finally, a record describing the changes is appended to the transaction log. |