How does datomic handle "corrections"?
Posted
by
blueberryfields
on Programmers
See other posts from Programmers
or by blueberryfields
Published on 2013-10-02T23:07:28Z
Indexed on
2013/11/02
4:09 UTC
Read the original article
Hit count: 258
tl;dr
- Rich Hickey describes datomic as a system which implicitly deals with timestamps associated with data storage
- from my experience, data is often imperfectly stored in systems, and on many occasions needs to retroactively be corrected (ie, often the question of "was a True on Tuesday at 12:00pm?" will have an incorrect answer stored in the database)
This seems like a spot where the abstractions behind datomic might break - do they? If they don't, how does the system handle such corrections?
Rich Hickey, in several of his talks, justifies the creation of datomic, and explains its benefits.
His work, if I understand correctly, is motivated by core the insight that humans, when speaking about data and facts, implicitly associate some of the related context into their work(a date-time). By pushing the work required to manage the implicit date-time component of context into the database, he's created a system which is both much easier to understand, and much easier to program. This turns out to be relevant to most database programmers in practice - his work saves everyone a lot of time managing complex, hard to produce/debug/fix, time queries.
However, especially in large databases, data is often damaged/incorrect (maybe it was not input correctly, maybe it eroded over time, etc...). While most database updates are insertions of new facts, and should indeed be treated that way, a non-trivial subset of the work required to manage time-queries has to do with retroactive updates.
I have yet to see any documentation which explains how such corrections, or retroactive updates, are handled by datomic; from my experience, they are a non-trivial (and incredibly difficult to deal with) subset of time-related data manipulation that database programmers are faced with.
Does datomic gracefully handle such updates? If so, how?
© Programmers or respective owner