2 ms·
It's immutable in the same sense a purely functional data structure is immutable. You represent mutation by making a new version of the data structure. Of cours
by qsort 5y ago
It's immutable in the same sense a purely functional data structure is immutable. You represent mutation by making a new version of the data structure. Of course you don't literally do that on the database because it would be inefficient, but there are several algorithmical tricks that can expose an interface that works as if.
- artemonster 5y agothat makes sense on a language level, when you hold a reference to some data and you can assume nothing can be changed about it. how does that hold on DB level?
- qsort 5y agoIn the same way. A database is basically just a giant data structure, a table is not unlike a B-Tree (in some engines it literally is a B-tree). Data warehouses already do something like this informally, as they are structured in a star schema around a single "append-only" fact table.