4 ms·
Sadly the choice of sql tends to make underlying framework very complicated and sometimes incapable. Some things got easier to express with SQL after Json_agg
by tehlike 4y ago
Sadly the choice of sql tends to make underlying framework very complicated and sometimes incapable.
Some things got easier to express with SQL after Json_agg in postgres became a thing (now you can do multi-depth relations without blowing up the result table with Cartesian product) but it's still massive pain in the ass and Json agg has performance overhead too.
- smitty1e 4y agoEspecially for reporting, I'm just as happy to write a serious piece of SQL and execute it directly. This is the joy of SQLAlchemy: great features when you want to use them; escape hatches when you don't.
- tehlike 4y agoRight, most ORM tools give an escape hatch to execute raw SQL queries. However, even though SQL is turing complete, it's not a great language for retrieval imho. It's probably an artifact of the underlying relational models (and the relational output it has to generate) but still.
- smitty1e 4y agoI was all set to disagree with you, but a bit of googling yields => https://localcoder.org/is-sql-or-even-tsql-turing-complete https://localcoder.org/is-sql-or-even-tsql-turing-complete
- tehlike 4y agoIt could have been wrong, but main argument was whether SQL was a good language for retrieval or not, and for me that's a no. It's probably subjective though :)