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.
This table lists compatibility between lock types. + means the lock types are compatible, while - means they are incompatible.