Tech News
← Back to articles

Poor man's bitemporal data system in SQLite and Clojure

read original related products more articles

On trying to mash up SQLite with ideas stolen from Accountants, Clojure, Datomic, XTDB, Rama, and Local-first-ers, to satisfy Henderson's Tenth Law. Viz., to make a sufficiently complicated data system containing an ad-hoc, informally-specified, bug-ridden, slow implementation of half of a bitemporal database. Because? Because laying about on a hammock, contemplating hopelessly complected objects like Current Databases isn't just for the Rich man.

Don't try this at work!

The "Poor Man's Bitemporal Database", in the safety of my local box. No servers were harmed. Yet.

Especially fellow Clojurians trying to realise their Indie B2B SaaS dreams (translation: income and time-poor). Please use a proper professional time-oriented data system. The following are (pithy descriptions mine); and they are available gratis for fledgling commercial use.

Datomic… "the DB as a value" over an immutable log of all facts.

XTDB… "the DB as a value" over an immutable log of all bitemporal facts.

Rama… "any DB as dirt-cheap view" over an immutable log of all events.

Reading Guide / Thinky Thoughts Alert (same thing)

Solitary over-caffeinated temporal database rumination went out of hand. Even The Voices are fed up and want someone to stop us. Furthermore;

Sage friends already gently shook their heads after hearing The Voices. Their hard-won advice—"Just Use Postgres.", and "Please, for everyone's sake, stick with the relational models."—fell on deaf ears. Obviously, I am also incapable of following my own advice.

... continue reading