The XTDB team writes about its open-source bitemporal database, covering time-travel SQL, event-driven systems, and why CRUD should be retired.
HN commenters bring it up in discussions of bitemporal and immutable databases, often alongside Datomic, and one calls these databases a blind spot in database reviews.
Have you heard of XTDB / Bitemporality? The basic idea is to make time 2-dimensional, where each record has both a System Time range and a Valid Time range. Designed as a write-only db with full auditability for compliance purposes.
With 2D time you can ask complex questions about what you knew when, with simpler questions automatically extended into a question about the current time. Like:
"What is the price?" -> "What is the price today, as of today?" "What was the price in 2022" -> "What was the price in 2022, as of today?" "What was the price in 2022, as of 2023?" You probably don't want to just switch to XTDB, but if you pursue this idea I think you should look into 2D time as I think it is schematically the correct conceptualization for this problem.
Docs: https://docs.xtdb.com/concepts/key-concepts.html#temporal-columns--bitemporality | 2025 Blog: https://xtdb.com/blog/diy-bitemporality-challenge | Visualization tool: https://docs.xtdb.com/concepts/key-concepts.html#temporal-columns--bitemporality
Hi, I am running a webinar on the concept of bitemporal data management next week, as in https://en.wikipedia.org/wiki/Bitemporal_modeling - please sign up up here if you are at all interested: https://attendee.gotowebinar.com/register/2960607012900067930?source=hacker-news
I work on https://xtdb.com which is a novel database system that attempts to make bitemporal modeling more trivial (all data is bitemporal automatically!) - but this webinar is more generally about the concept, rather than our own work.
I've spent the last 4 years getting to grips with bitemporality in all its shapes & guises, and am more convinced than ever that this fundamental concept of cleanly separating the-timeline-of-the-system from the-timeline-of-the-data deserves wider attention.
There will be a Q&A discussion at the end of the webinar where it would be great to share stories and tips live, if you have any! And in the meantime I would be very glad to swap thoughts in the comments below. Thanks.
Does somebody have experience with XTDB https://xtdb.com/index.html ?
We would like to use it in our Clojure application perhaps with PostgreSQL as the backend (JDBC) to make it easier to implement a history feature.
Looking forward, instead of backward, it would be great for databases to have some kind of live-patch/ live-update feature so that one does not need any downtime at all if some rules are obeyed (with an automatic check, if that is the case). The same is for operating systems, where we have parts of the technology and even some limited deployment, but nothing of it is the default as far as I know. This situation makes it quite a bit harder to develop and maintain systems without introducing extreme complexity. It does not look like we will have less bugs/ less patches any time soon so we should make updating as easy as possible to drastically reduce the need for a maintenance window without resorting to building clusters for everything.
The - now free - Datomic (https://www.datomic.com) or the open source XTDB (https://www.xtdb.com) can provide instant access to your data at any point in time. Even to different points in time within a single query, without the concept of a "DB restore" operation.
So if your main use-case of restoring a DB from the past is to run analytical queries on it, then you should probably consider these solutions instead.
These systems rely on other databases to store their data, so they inherit the backup capabilities of those databases.
Would be interesting to consider, if they could benefit from using SQLite as a backend instead of H2DB/DynamoDB/Postgres or RocksDB/LMDB/Xodus/JDBC.
Datomic is an event-sourced db, and it makes it hard to introduce retroactive corrections to the data when your program's semantic already rely on using datomic's time travelling abilities: at one point you'll need to to distinguish between event time and recording time as explained in this excellent blog post:
https://vvvvalvalval.github.io/posts/2018-11-12-datomic-event-sourcing-without-the-hassle.html
This is why I' rather use XTDB [1], a database similar to datomic in spirit, but with bitemporality baked in.
[1] https://www.xtdb.com
Can’t say what people are using but keen to hear from others. I am looking into this atm, no implementation yet, and some of the things I am reading about are (I’ll add dolt to this list)
Xtdb: https://xtdb.com/
Terminus: https://github.com/terminusdb/terminusdb
Nessie: https://projectnessie.org/
Dvc : https://dvc.org
Liquid base: https://liquibase.org/
Datasette: https://datasette.io/
Still framing in my mind how schema evolution, x-temporal and e.g. scd in data modelling, version control etc. tie in together in an approach.