Sun Apr 11 17:07:50 EDT 2010
To SQL or not to SQL?
I have no good intuition about dealing with databases. Let's look at
the design space when using databases:
1. query language (SQL, Scheme, ...)
2. storage medium (memory, disk, server, ...)
3. update vs. query patterns
Where 1. isn't a real issue (as long as you can express what you want
to know it's fine) and 2. is pure implementation. However, 3. is
quite a constraint.
If there are no updates, data representation can be heavily optimized
(compiled) to fit the need of the queries. (like in ramblings.ss)
If there are updates, consistency becomes a serious problem, and needs
to be solved properly, i.e. the ACID principle, while caches are
usually too complicated to keep up-to-date. The reason you want to
sqeeze things into a single SQL query is exactly that.
So that's one axis: mutable vs. immutable (where ramblings.ss is
mutable but the representation uses a cache).
Another axis is relational vs. non-relational. See next post.