Database Transactions

Transactions are a set of SQL statements consisting of any combination of INSERTS, DELETES, and UPDATES that either succeed or fail as a unit.
A typical example is a bank account transfer. A transfer might consist of searching for an account. If the account has more than $100.00 the $100.00 is deleted. Then a search is done for another given account and the second account is updated with the $100.00. If any part of this fails, the entire transaction rolls back.

Homogeneous Transactions


In a homogeneous transaction, all SQL statements use the same data source. The data source manages data integrity.

Heterogeneous Transactions

A heterogeneous transaction consists of SQL statements that run against multiple data back ends. Heterogeneous transactions use a transaction manager outside of the database to handle data integrity between data sources.

NAS 4.0 includes an embedded transaction manager.

Heterogeneous and Distributed Transactions

A distributed transaction involves network calls to another NAS engine. An example is an EJB that invokes another EJB. When each EJB makes calls to separate databases, the transaction is both heterogeneous and distributed.