This chapter explains transactions and a somewhat related topic, locking. Both of these features require database support, but are critical for ensuring data integrity.
A transaction is a mechanism for grouping a set of statements together as a unit. A transaction should be atomic, consistent, independent, and durable (ACID). Depending on the application, this capability can be extremely important.
As an example of the importance of a transaction's ACID properties, consider the elements of a bank transaction. Let's say that you wish to move money from a checking account into a savings account, using the conceptual tasks:
Verify that checking account has more than $100.
Remove $100 from checking account. ...