Home  >  Article  >  Database  >  How many locking systems are there in JDBC?

How many locking systems are there in JDBC?

WBOY
WBOYforward
2023-09-03 14:17:08760browse

How many locking systems are there in JDBC?

You can lock a record, a group of records, a database table, a tablespace, etc., and when we do this, we cannot change the locked value. The following are the types of locks in JDBC:

  • Row locks and key locks: They are used to lock specific rows. Using these locks you can achieve concurrency.

  • Page Lock: These are used to lock pages. If you apply this feature, whenever the contents of a row change, the database locks the entire page that holds the row. You can use this lock if you need to update/change a large number of rows at once.

  • Table Locks: You can use these locks. There are two types of table locks. Shared and exclusive.

  • Database lock: This will lock the entire database. You can use this lock to prevent transactions from other databases from accessing the current database.

The above is the detailed content of How many locking systems are there in JDBC?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete