Re:Sled: Embedded Database Written in Rust
by Ericson2314 on Saturday February 22, 2020 @12:55AM
(#22389656)
> A key/value database doesn't really want to know about an application's type
Relational DBs have for decades.
> Because that complicates storage algorithms because sorting is now much more complex
Leveraging the types to build better indices is huge. Different data admits different total orders / partial order / lattices / other mathematical structure. If you generalize the math to infinitely large tables, this is not the difference between certain queries existing or not existing, it is the deference between queries existing or not existing. One might say limit of algorithmic complexity is realizability https://ncatlab.org/nlab/show/realizability.
A key/value database doesn't really want to know about an application's types, because that complicates storage algorithms because sorting is now much more complex. In the same way, asm doesn't really have data types. All you have are bytes and addresses. A database needs to be able to use the encoding that it's given, rather than create another type system underneath it.