2 ms·
The SQL:2011 standard does describe a mechanism for solving this called System Versioned Tables, but the only database I've encountered that implements it so fa
by simonw 4y ago
The SQL:2011 standard does describe a mechanism for solving this called System Versioned Tables, but the only database I've encountered that implements it so far is MariaDB: https://mariadb.com/kb/en/system-versioned-tables/ https://mariadb.com/kb/en/system-versioned-tables/
https://en.wikipedia.org/wiki/Temporal_database https://en.wikipedia.org/wiki/Temporal_database lists a few more - apparently there are versions of this in Oracle, DB2 and SQL Server now.
- scythmic_waves 4y agoI happened to fall down this rabbit hole a few days ago because of another HN thread. In it, a commenter mentioned [1] a talk by Markus Winand where he goes over some of the more interesting additions to the SQL standard since 92, including versioned tables [2] (I've linked to the timestamp, but the whole talk is good). I got real excited about that feature because I could think of a few tables at work that could use it. Sadly, PostgreSQL doesn't implement it [3] (I can't permalink to the feature but you can search for "T180", "System-versioned tables", "T181", or "Application-time period tables"). [1] https://news.ycombinator.com/item?id=34182433 https://news.ycombinator.com/item?id=34182433 [2] https://www.youtube.com/watch?v=xEDZQtAHpX8&t=2276s https://www.youtube.com/watch?v=xEDZQtAHpX8&t=2276s [3] https://www.postgresql.org/docs/current/unsupported-features-sql-standard.html https://www.postgresql.org/docs/current/unsupported-features...