Show TOC Start of Content Area

Background documentation Transactions  Locate the document in its SAP Library structure

A single logical operation can result in several operation for the database. The transaction guarantees that the database stays consistent during these operations. A transaction contains several database operations  that are either executed all at once or not at all.

The transaction ensures the following:

·        Atomicity: The operations are executed all at once, or not at all.

·        Consistency: The affected data is kept in consistent state.

·        Isolation: The software is protected from external manipulations to shared data (the degree may vary though).

·        Durability: Once a transaction has been confirmed, the result is stored and will not be reversed.

Transactions also improve the performance.

     Connection conn = …  // get connection from pool
     
conn.setAutoCommit(false);
     … 
// do several updates
     
conn.commit();

 

 

End of Content Area