The basic idea behind ensuring atomicity is this: The database system
keeps track (on disk) of the old values of any data on which a transaction
performs a write. This information is written to a file called the log. If the
transaction does not complete its execution, the database system restores the
old values from the log to make it appear as though the transaction never
executed. We discuss these ideas further in Section 14.4. Ensuring atomicity
is the responsibility of the database system; specifically, it is handled by a
component of the database called the recovery system, which we describe in
detail in Chapter 16.