Database lock tell a transaction, if the data item in questions is currently being used by other transactions.
1. Shared Lock
When a shared lock is applied on data item, other transactions can only read the item, but can’t write into it.
2. Exclusive Lock
When a exclusive lock is applied on data item, other transactions can’t read or write into the data item.