←back to thread

752 points crazypython | 1 comments | | HN request time: 0.245s | source
Show context
joshspankit ◴[] No.26371220[source]
I never understood why we don’t have SQL databases that track all changes in a “third dimension” (column being one dimension, row being the second dimension).

It might be a bit slower to write, but hook the logic in to write/delete, and suddenly you can see exactly when a field was changed to break everything. The right middleware and you could see the user, IP, and query that changed it (along with any other queries before or after).

replies(4): >>26371248 #>>26371348 #>>26371403 #>>26371411 #
1. predakanga ◴[] No.26371411[source]
This does exist, though support for it is pretty sparse; it's called "Temporal Tables" in the SQL:2011 standard - https://sigmodrecord.org/publications/sigmodRecord/1209/pdfs...

Last time I checked, it was supported in SQL server and MariaDB, and Postgres via an extension.