Database - Managing Multiuser Databases - Discussion

Discussion Forum : Managing Multiuser Databases - General Questions (Q.No. 7)
7.
The advantage of optimistic locking is that:
the lock is obtained only after the transaction has processed.
the lock is obtained before the transaction has processed.
the lock never needs to be obtained.
transactions that are best suited are those with a lot of activity.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
3 comments Page 1 of 1.

Shubham said:   8 years ago
Since after transaction, the timestamp/hash etc. Whichever is used, are changed, and are used as to filter out the updates, when committing.

Anjuli said:   1 decade ago
Optimistic Locking is a strategy where you read a record, take note of a version number and check that the version hasn't changed before you write the record back. When you write the record back you filter the update on the version to make sure it's atomic. (i.e. Hasn't been updated between when you check the version and write the record to the disk) and update the version in one hit.

Anjali said:   1 decade ago
What is optimistic lock?

Can anyone explain?

Post your comments here:

Your comments will be displayed after verification.