A transaction is a logical unit of work on the database. It may be an entire program,
a part of a program, or a single command (for example, the SQL command INSERT or
UPDATE), and it may involve any number of operations on the database. In the database
context, the execution of an application program can be thought of as one or more trans-actions with non-database processing taking place in between. To illustrate the concepts
of a transaction, we examine two relations from the instance of the DreamHomerental
database shown in Figure 3.3: