- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How many locking systems are there in JDBC?
You can lock a record, set of records, database table, table-space etc. and when we do we cannot change the locked values. Following are the types of locking in JDBC:
Row and Key Locks: These are used to lock a particular row. Using these locks, you can achieve concurrency.
Page Locks: These are used to lock a page. If you apply this, whenever the contents of a row changes, the database locks the entire page which holds the row. If you need to update/change large number of rows at once you can use this lock.
Table Locks: You can lock a table using these locks there are two kinds of table locks. Shared and exclusive.
Database Lock: This locks the whole database. You can use this lock to prevent transactions of other database to access the current database.