4 ms·
You dont necessarily need to use locks in the db. You can use transactions as well, unless you want to do major changes to the DB where transactions would be in
by Chilinot 6y ago
You dont necessarily need to use locks in the db. You can use transactions as well, unless you want to do major changes to the DB where transactions would be in constant conflict state.
- bluejekyll 6y agoYou’re right, though that wasn’t really the point of my reply. More that concurrency in the DB is a DB design choice and not the responsibility of the language accessing the DB. This is especially true when accessing the DB from multiple nodes, which most deployed software does.
- branko_d 6y agoLocks and transactions are intertwined. Write locks are typically released only when the transaction ends, and read locks too at some transaction isolation levels.