Consider the schedule of two bank withdrawal transactions shown in Figure 21.13 for which SNAPSHOT isolation leads to an inconsistent database. Suppose that the bank encodes, as an integrity constraint in the database schema, the business rule “The sum of the balances in all accounts owned by the same depositor must be nonnegative.” Then that particular schedule cannot occur.
Although the integrity constraint is nowmaintained, the specification of a
particular transaction might assert that when the transaction commits, the database
state satisfies a stronger condition. Give an example of a stronger condition that a withdrawal transaction might attempt to impose when it terminates and a schedule of two such transactions at SNAPSHOT isolation that causes them to behave incorrectly.
Each account has |S10 initially, and each transaction is trying to withdraw |S5, but is
trying to maintain the condition that the total in the two accounts is at least |S12. Note this is not a business rule or an integrity constraint — the final database is consistent, just incorrect.
You might also like to view...
The most popular active social bookmarking services among ________ users include Delicious, Digg, reddit, and StumbleUpon
Fill in the blank(s) with correct word
You can import ________ worksheet(s) at a time during an import operation
Fill in the blank(s) with correct word