What is the difference between Optimistic and Pessimistic locking?



What is the difference between Optimistic and Pessimistic locking?..

Answer / Gagan Kumar Mishra

Optimistic locking assumes that multiple users will not modify the same data simultaneously. It checks for conflicts when the data is updated, while the update operation takes place in the user's local cache. Pessimistic locking, on the other hand, locks the data before it is modified to prevent other users from modifying it until the first transaction is completed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

Can you explain how to enable and disable connection pooling?

1 Answers  


Where do you store connection string ?

3 Answers   Digital GlobalSoft,


What are the classes in System.Data.Common Namespace?

1 Answers  


How to get the new oledb connection of oracle in database programming?

1 Answers  


Do we use stored procedure in ADO.Net?

1 Answers  


How do we invoke queries from the application ?

2 Answers   ICICI, Microsoft,


What is data adapter in ado.net with example?

1 Answers  


What is the hierarchy of data in databases?

1 Answers  


What is microsoft ado?

1 Answers  


Define Execute Scalar?

1 Answers   UGC Corporation,


What is the difference between connected and disconnected environment?

1 Answers  


Which database is the ado.net sql connection object designed for?

1 Answers  


Categories