Subject When to use database locks?
Author Leonardo DIppolito
Are they really necessary for simple CRUD operations? I am trying to
understand when to use them, since for update's and delete's I can use
an optimistic concurrency mechanism, like a timestamp column.

If I need to check if a record exists before inserting, to avoid
duplicates, the only way to do this is by using a lock?

I appreciate any information.