Locking - A process in which any data that retrieved by a user for updating must be locked (or denied to other user) until the update is completed or aborted.
Locking data is much like checking book out of the library; it is unavailable to other until the borrower returns it.
Locking level- Locking granularity
- Database
- Tables
- Block
- Record
- Field
Block level is the most commonly implemented locking level.
Block/Page - Block mean physical storage sector.
Type of lock
1. Shared Lock or Read Lock
This type of lock allows other transaction to read, but not updates a record or other resource.
2. Exclusive Lock or Write Lock
A technique that prevents another transaction from reading and updating a record until it is unlocked placing on exclusive lock on a record prevent another user from placing any type of lock on that record.
3. Dead Lock
An impasse(impossible to make any movement) that results when two or more transaction have locked a common resource and each waits for the other to unlock that resource.
2. Exclusive Lock or Write Lock
A technique that prevents another transaction from reading and updating a record until it is unlocked placing on exclusive lock on a record prevent another user from placing any type of lock on that record.
3. Dead Lock
An impasse(impossible to make any movement) that results when two or more transaction have locked a common resource and each waits for the other to unlock that resource.
No comments:
Post a Comment