top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the different types of locking in JDBC?

0 votes
363 views
What are the different types of locking in JDBC?
posted Aug 17, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

There are two types of locking mechanism to prevent data corruption because of more than one user working with the same data.

Optimistic Locking – Locking the record only when update is taking place
Pessimistic Locking – Locking the record from the select to read, update and commit phase.
Apart from that some DBMS systems provide locking mechanism to lock single row, table or database.

answer Aug 18, 2017 by Neeraj Kumar
...