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 statements: I: T1 can read Q but cannot write Q. II: T2 can read R but cannot write R. Which of the above statement(s) is/are valid ?
The correct option is (1): In database concurrency control, the locking protocol dictates the operations a transaction can perform on a locked data item. A Shared-mode lock (S) is primarily used for read-only operations. When Transaction T1 obtains an S lock on data item Q, it signifies T1's intent to read Q, and it is permitted to do so. Crucially, an S lock is established specifically to prevent modification, ensuring…Read More
Source :
Source :
Source :
Source :