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!