WHAT IS DIFFERENCE BETWEEN OPTIMISTIC AND PESSIMISTIC LOCKING?

Sumit Kesarwani

Total Post:782

Points:3910
Posted by  Sumit Kesarwani
C# 
C#
 1928  View(s)
Ratings:
Rate this:
  1. Sumit Kesarwani

    Post:782

    Points:3910
    What is difference between Optimistic and Pessimistic locking?

    In Pessimistic locking when user wants to update data it locks the record and till then no one can update data. Other user’s can only view the data when there is pessimistic locking

    In Optimistic locking multiple users can open the same record for updating, thus increase maximum concurrency. Record is only locked when updating the record.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!