How many types of locks can an application developer choose? Explain.

The application developer can choose between different lock modes :

• Write locks (lock mode Exclusive) : the lock data can be edited only by one user. The requests for another write lock and another read lock are rejected. A write lock protects the locked objects against all types of other transactions. Only the same lock owner can set the lock again.

• Read locks(lock mode Shared) : several users can have access to the locked data at the same time. The requests for additional read locks are accepted, even if they are from other users. A write lock is rejected.

• Enhanced write locks(lock mode exclusive noncumulative) : while write locks can be successively requested and released by the same transaction, an enhanced write lock can only be request once, even by the same transaction. All other requests for locks are rejected.

• Optimistic locks(lock mode Optimistic) : optimistic locks respond like read lock at first and can be changed to write locks. An optimistic lock is set if the user displays the data in changed mode.
Post your comment