The problem of inconsistent analysis occurs when a transaction reads several values from
the database but a second transaction updates some of them during the execution of the
first. For example, a transaction that is summarizing data in a database (for example,
totaling balances) will obtain inaccurate results if, while it is executing, other transactions
are updating the database. One example is illustrated in Figure 20.6, in which a summary
transaction T
6
is executing concurrently with transaction T
5
. Transaction T
6
is totaling
the balances of account x (£100), account y (£50), and account z (£25). However, in the
meantime, transaction T
5
has transferred £10 from bal
x
to bal
z
, so that T
6
now has the wrong
result (£10 too high). This problem is avoided by preventing transaction T
6
from reading
bal
x
and bal
z
until after T
5
has completed its updates.