Entering content frame

 Transactions 

Among other things, the transaction management functions of a database system make sure that parallel transactions from multiple database sessions are processed correctly, and that they deliver the same results as if the transactions were processed sequentially.

A transaction is a sequence of sql statements that are handled by the database system as a unit, in the sense that any modifications made to the database by the sql statements are either all reflected in the state of the database, or else none of the database modifications are retained.

When you open an SQL session, you also open the first transaction. A transaction is concluded with a COMMIT or a ROLLBACK. This has the following consequences:

·        When a transaction is successfully concluded with a commit, all of the changes to the database are retained.

·        However, if a transaction is terminated using a rollback statement, or if it is terminated in another way, all of the changes to the database made by the transaction are rolled back.

Both COMMITs and ROLLBACKs open a new transaction implicitly.

Since the database system allows concurrent transactions to access the same database objects, locks are required to isolate individual transactions.

For information on the SQL statements that manage transactions, see the Reference Manual under Transactions.

 

Leaving content frame