3 ms·
Meh. If you don't have "database joins", meaning SQL queries that have the word JOIN in them, then you end up effectively replicating the join in your glue cod
by blahedo 16y ago
Meh. If you don't have "database joins", meaning SQL queries that have the word JOIN in them, then you end up effectively replicating the join in your glue code somewhere (either on the insert side or on the query side). And if you put the join in the code, it is algorithmically fixed; there is no chance that the database can optimise this for you.
On the other hand, if you write your query in SQL on a moderately normalised database, you have the potential for the database itself to figure out what to denormalise, and what to parallelise, and any other sorts of optimisations it might do. It just has to know what the typical queries are.
There's a lot of power in using a declarative rather than an imperative paradigm.