2 ms·
> All because we're programming against a frozen database spec. Relational databases, unlike XML, JSON, Key/Value stores and ORMs, do not pre-suppose document
by ericHosick 9y ago
> All because we're programming against a frozen database spec.
Relational databases, unlike XML, JSON, Key/Value stores and ORMs, do not pre-suppose document structure. On top of that, it is very easy to create new relations (entities) using Views. On top of that, you get a real algebra to play with: relational algebra.
SQL makes it crazy easy, in real time, to see your data in any hierarchal manner you like (via denormalized entities).
The one thing SQL 'lacks', and JSON shines at, is a way to return data in a hierarchical format (aka: to return JSON directly). I have 'lacks' in quotes because there are SQL solutions that can consume/spit out JSON.
An interesting idea then is to provide a way to easily convert between SQL and JSON. To that end, there is an open source project https://github.com/erichosick/sql-json https://github.com/erichosick/sql-json that attempts this. The results are promising but there is a lot of room to grow.
- josephg 9y agoHi, post author here. My point about the frozen spec doesn't have anything to do with the data format. Its that modern databases don't expose the API that modern web applications actually want, like: - Integrated access control - Realtime updates (sorta, kinda) - Resumable event logs - The ability to do computed views in my language (eg, make a computed view using a nodejs react static rendering process) Because databases lack these features, modern web developers often end up rewriting them at the application level, for every app.