Types and scope of locks in Derby systems

There are several types of locks available in Derby systems,
including exclusive, shared, and update locks.

Exclusive locks
When a statement modifies data, its transaction holds an exclusive lock on data that prevents other transactions from accessing the data.

Shared locks
When a statement reads data without making any modifications, its transaction obtains a shared lock on the data.

Update locks
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.

Lock compatibility
This table lists compatibility between lock types. + means the lock types are compatible, while - means they are incompatible.