3 ms·
The things with SQL is that it's more like parroting RelAlgebra instead of trying to implement it with a comfortable syntax. All the bad ideas of the Cobol lang
by vkazanov 3y ago
The things with SQL is that it's more like parroting RelAlgebra instead of trying to implement it with a comfortable syntax. All the bad ideas of the Cobol language generation come with it.
And, like you said, SQL kills one of the core ideas of RelAlgebra: composability.
I find it very sad that behind the scenes in most relational DBs, the mess off SQL gets translated to the operator language which the optimizer works with. Now, /that/ language is pure relational algebra complete with nice mathy properties.
- jeltz 3y agoThe optimizer does not work work on pure relational algebra. Or works on something very similar to SQL in the case of PostgreSQL.
- vkazanov 3y agoThe operators in PostgreSQL used to represent something that feels a lot closer to rel algebra than SQL. Admittedly, I haven't looked at pgsql code for 10+ years so this could have changed.