Let transaction T1 has obtained a shared mode lock S on data item Q and transaction T2 has obtained an exclusive mode lock X on data item R Consider the following statement. I: T1 can read Q but cannot write Q. II. T2 can read R but cannot write R. Which of the above statements is / are valid?
Let transaction T1 has obtained a shared mode lock S on data item Q and transaction T2 has obtained an exclusive mode lock X on data item R Consider the following statement. I: T1 can read Q but cannot write Q. II. T2 can read R but cannot write R. Which of the above statements is / are valid? Correct Answer Only I
Concept :
A lock is a variable associated with a data item that describes the status of the data item with respect to possible operations that can be applied to it. They synchronize the access by concurrent transactions to the database items. It is required in this protocol that all the data items must be accessed in a mutually exclusive manner.
Shared Lock: If a transaction Ti has obtained a shared-mode lock (denoted by S) on item Q, then Ti can read, but cannot write, Q.
Exclusive Lock: If a transaction has obtained an exclusive mode lock, then it can both read and write on the item on which it in operating.
Hence Option 1 is correct
মোঃ আরিফুল ইসলাম
Feb 20, 2025