Pregunta de entrevista de Oracle

difference between read lock and write lock

Respuesta de la entrevista

Anónimo

1 de ago de 2023

The difference between LockModeType.Read and LockModeType.Write lies in the level of access and the type of lock. LockModeType.Read allows multiple transactions to read the entity simultaneously but restricts updates and deletes. On the other hand, LockModeType.Write grants an exclusive lock, allowing only one transaction at a time to modify or delete the entity, and it also prevents other transactions from acquiring any type of lock on the same entity.