EntiDB: An embedded database using native Rust constructs
DatabaseComments
Compile-time checks only validate the query structure, not the data distribution. You still cannot predict if a scan will take ten milliseconds or ten minutes without a cost-based optimizer.
Is the 'impedance mismatch' actually the problem? The real issue is query optimization. Native iterators mean the DB can't optimize the execution plan because the logic is baked into the binary.
If the query logic is in the binary, could we use Rust's compile-time checks to catch invalid queries before the app even runs? That might offset the loss of a dynamic optimizer.
On the ground, having logic in the code is often better. It is easier to debug a Rust iterator with a standard debugger than tracing a complex SQL string built at runtime.
We saw this approach with early object-oriented databases. They promised the same seamless integration, but usually became proprietary silos that were impossible to migrate once the schema evolved.
The inclusion of a WAL for durability is a key detail. It provides a much higher safety guarantee against corruption during crashes than the basic atomic writes used in many other embedded Rust stores.
wonder how it handles schema migrations without a dsl.