In this article, I will establish how the SQL language and its implementations distinguish between changed values and modified values, where a changed value is a value that has been "touched", but not necessarily modified, i.e. the value might be the same before and after the change. Many ORMs, unfortunately, either update all of a … Continue reading ORMs Should Update “Changed” Values, Not Just “Modified” Ones
Tag: pessimistic locking
How to Avoid the Dreaded Dead Lock when Pessimistic Locking – And some Awesome Java 8 Usage!
Sometimes you simply cannot avoid it: Pessimistic locking via SQL. In fact, it's an awesome tool when you want to synchronise several applications on a shared, global lock. Some may think this is abusing the database. We think use the tools you have if they can solve the problem you have. For instance, the RDBMS … Continue reading How to Avoid the Dreaded Dead Lock when Pessimistic Locking – And some Awesome Java 8 Usage!
FOR UPDATE simulation in SQL Server and CUBRID
Pessimistic locking is useful every now and then when you explicitly want to lock a given set of rows for a subsequent UPDATE, or for database-based inter-process synchronisation and locking. Normally, you would use the SQL Standard FOR UPDATE clause, which is supported in most databases. A SQL standard example -- This statement will produce … Continue reading FOR UPDATE simulation in SQL Server and CUBRID