Read-Modify-Write


Last Updated on Feb 17, 2021

Applications generally adopt the Read-Modify-Write cycle to update values in the database.

The process starts with the application reading the existing, committed value from the database and loading it into memory. The value is then manipulated per the requested change, in accordance with any business rules associated with the modification. The changed value is lastly written back into the database to be committed.

While the Read-Modify-Write cycle is easy to code, it exposes the application to the risk of Lost Updates. If two transactions were to concurrently write to the same object or row, the second transaction may overwrite the value written by the first transaction.


© 2022 Ambitious Systems. All Rights Reserved.