Pregunta de entrevista de ERNI

What is optimistic and pessimistic locking?