|
A transaction can end with a commit or a rollback. When a transaction
commits, the data modifications made by its statements are saved. If a statement
within a transaction fails, the transaction rolls back, undoing the effects of
all statements in the transaction. Undoing data posted to the database
can be tricky if the transaction involves updating two or more columns
in one table or updating more than one table because you want to be sure
not to leave any partial data behind. The Java programming language
provides APIs for handling distributed transactions.
|