The exclusive lock is also called the Write lock ((eXclusive lock, précis-writers is the x lock), if the transaction T to the data object a plus x lock, then only allow T to read and modify a, no other transaction can be a plus any type of lock, until T release the lock on A. It prevents any other transaction from acquiring a lock on the resource until the original lock on the resource is released at the end of the transaction. An exclusive lock is always applied during an update operation (INSERT, update, or DELETE). The difference between a shared lock: A shared lock is also called a read lock (Share lock, précis-writers is a s lock), and if the transaction T is a plus s lock on the data object A, the other transaction can only be locked to a plus s, not the x lock, until T releases the S lock on a.
Shared lock "s lock"
Also called a read lock, if the transaction T with the data object a plus s lock, then the transaction T can read a but cannot modify a, the other transaction can only a plus s lock, and cannot add x lock, until T release S lock on A. This ensures that other transactions can read a, but cannot make any modifications to a before T releases the S lock on a.
Exclusive lock "x lock"
Also known as write lock. If the transaction t has an X lock on the data object A, the transaction T can read a or modify a, and the other transaction cannot add any locks to a, until T releases the lock on A. This ensures that the other transaction cannot read and modify a until the lock on the A is released by T.
Shared lock "s lock" exclusive lock "x lock"