4 ms·
This is very much like database normalization, in that it has the benefit of making invalid data impossible, but the drawback of often making queries into the d
by teddyh 6y ago
This is very much like database normalization, in that it has the benefit of making invalid data impossible, but the drawback of often making queries into the data much more cumbersome and usually also inefficient.
As with database normalization, it is a good idea to first do it as much as possible, and then denormalize again until it is fast enough.
- rocqua 6y agoI have always has the idea of a database that does the denormalizations you want automatically for you. Essentially, you keep the DB in a normalized state. You define views of the DB that you want. Then the DB keeps those views as tables for you, and the DB does all of the hard work of keeping those view tables consistent with the denormalized data. Essentially the DB does the atomicity, cache-invalidation, and cache-updating for you. You get performance, and you get the certainty that invalid states are un-representable. I guess the biggest blocker here is in automatically determining what fields do and do not need to be update automatically?
- Serow225 6y agoCheck out the Noria project/database from MIT, I think you'd like it :) https://github.com/mit-pdos/noria https://github.com/mit-pdos/noria https://corecursive.com/030-rethinking-databases-with-jon-gjengset/ https://corecursive.com/030-rethinking-databases-with-jon-gj... https://notamonadtutorial.com/interview-with-norias-creator-a-promising-dataflow-database-implemented-in-rust-352e2c3d9d95 https://notamonadtutorial.com/interview-with-norias-creator-... https://pdos.csail.mit.edu/papers/noria:osdi18.pdf https://pdos.csail.mit.edu/papers/noria:osdi18.pdf
- dllthomas 6y agohttps://en.wikipedia.org/wiki/Materialized_view https://en.wikipedia.org/wiki/Materialized_view