Question:
In a multi-user database environment, locking mechanisms can be used to solve the three basic problems of concurrency. On the other hand, however, locking may also lead to an undesirable problem of deadlock.
(a) Explain the concept of deadlock, and give an example of a deadlock situation as a result of locking.
(b) There are three main problems related to concurrency in multi-user database systems: lost updates, inconsistent analysis, and uncommitted dependency.
(i) Discuss the different types of locking mechanisms which can be used to overcome these problems support your answer with appropriate example.
(ii) Describe the concept of granularity level for locking, and discuss the effect of locking granularity on the degree-concurrency: in the database systems.