AUTOCOMMIT, COMMITs, and ROLLBACKs

The SQL language has COMMIT and ROLLBACK statements that control when changes made to a database are physically committed to disk.

To ensure consistency of the data in a database, it is often necessary for applications to apply a number of changes together as a unit. This is called a unit of work. A unit of work is a recoverable sequence of operations within an application process. It is the basic mechanism that an application uses to ensure database integrity. At any given time, an application process has a single unit of work, but the life of an application process can involve many units of work. A unit of work is also known as a transaction.

Any application that successfully connects to a database automatically ...

Get Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.