Updating data causes a lot of the problems we struggle with in our systems:
- Updating data cause data loss.
- Updating data cause concurrency problems.
- Updating data requires complex transactional processing or compensation logic.
So, why do we keep updating our data?
Cloud storage is abundant, and super cheap.
There is no reason for throwing data away anymore these days.
There is no reason to introduce concurrency problems in our apps.
Instead prefer append only data models.
There are plenty to choose from:
- Business native append-only models such as Journaling (in Accounting), Auditing (in Access Control), etc...
- Event Sourcing can be used to model any business capability or process step.
- When you need state, look into Conflict Free Replicated Data Types (CRDT's) to represent it.
Consider defaulting to these techniques.
Unless you intentionally want to throw data away...