News for hackers. Stuff that matters.
Re:Datomic: Can Simple be also Fast? by joevandyk on Sunday September 22, 2013 @11:48AM (#6426929)
One database pattern I use is to have new data/events be inserted into tables. Then use either window functions, views, and/or triggers to get a snapshot of the most current version of the data. It takes more space, but it allows me to figure out why the database is in the state that it is.

For example, if I want to track ups shipments, I'd set up a shipment_events table. Every time I check the status of a shipment, I'd insert into the shipment_events table. If the shipment changes state from in_transit to delivered, then I'd set shipments.state="delivered".

There are no comments on this comment yet.