top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

What are the different types of locking in JDBC?

0 votes
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
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.