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.

Computer Science & Information Technology

You might also like to view...

The ________ makes it possible to see when team members are available for appointments

A) Scheduling Assistant B) Meeting Maker C) Meeting Manager D) Calendar Assistant

Computer Science & Information Technology

In order for the AND function to return a true value, all arguments must be true

Indicate whether the statement is true or false

Computer Science & Information Technology