The classic way that we use databases is oriented towards the amount of available storage that we have for data. It's time to rethink that pattern, now the cost of storage sinks so fast that it must converge to free or nearly free at some point.
Consider the following record in a database:
The traditional pattern for updating this record is to replace the value in place:
Why have we always done this? Well, in fact we haven't. When storage was still simply a piece of paper, we simply slipped in a new piece of paper in the folder and that would be the new valid file, plus as a bonus, you had a history over time.
Now that the cost of storage is not a problem anymore, we should go back that paradigm. The above example would translate to:
|residence||point in time 1||Oldebroek|
|residence||point in time 2||Mastenbroek|
Note that we added a perception of time to the record to be able to figure out what the prevailing version of the record is. Think a bit what this means for your application. You simply store a new fact at a point in time without erasing the past.
You can implement this paradigm into your existing database by adding it to your design, or you can use database technology that does this by design. You might find Sesame or Apache Jena interesting. Alternatively you could look into Datomic.
Interested in Datomic?
- We have a tech day planned for 25/2 that you can sign up for via https://www.avisi.nl/nl/evenementen/
- student at the HAN? We have a tostitalk about Datomic planned at 25/2 in Lokaal 99. Sign up via the form at https://www.avisi.nl/nl/evenementen/.