There are several types of locks available in Derby systems,
including exclusive, shared, and update locks.
When a statement modifies data, its transaction holds an exclusive lock on data that prevents other transactions from accessing the data.
When a statement reads data without making any modifications, its transaction obtains a shared lock on the data.
When a user-defined update cursor (created with the FOR UPDATE clause or by using concurrency mode ResultSet.CONCUR_UPDATABLE) reads data, its transaction obtains an update lock on the data.
The following table shows the compatibility between lock types. "Yes" means that the lock types are compatible, while "No" means that they are incompatible.