Suppose that we declare all of the database integrity constraints in the database schema so that the DBMS will not allow any transaction to commit if its updates violate any of the integrity constraints. Then, even if we do not use any concurrency control, the database always remains consistent. Explain why we must nevertheless use a concurrency control.
What will be an ideal response?
We must use a concurrency control to maintain correctness. For example, the following schedule of two transactions preserves database consistency (the database satisfies its integrity constraints), but nevertheless the final database does not reflect the effect of both transactions. Two interleaved deposit transactions of |S10:
r1(bal) r2(bal) w1(bal = bal + |S10) w2(bal = bal + |S10)
The integrity constraint is bal ? 0. When the schedule completes, the integrity
constraint is satisfied, but the database is incorrect – T1’s update has been lost.
Alternatively, a schedule in which read/write transactions are serializable (and
hence all integrity constraints would be preserved), but read-only transactions are not serializable with respect to read/write transactions would be allowed.
You might also like to view...
A comment can be displayed in a(n) ________ in the document's margin
Fill in the blank(s) with correct word
?If a notebook contains sensitive material, you can __________.
Fill in the blank(s) with the appropriate word(s).
What is a T-shaped thinker?
A. A T-shaped thinker is a design expert with a broad knowledge base. B. A T-shaped thinker is a design expert who specializes in typography. C. A T-shaped thinker is a philosopher who dabbles in design.
Site preparation can include _____.
a. the hiring and training of information systems personnel b. installing special wiring and air conditioning c. readying users for a new system d. physically placing a computer system on the site and making it operational