News for hackers. Stuff that matters.
Re:How and why the Relational Model works for databases by goto11 on Monday January 17, 2022 @04:31AM (#29964839)
SQL syntax assumes queries have operations in a certain order - join, filter, group, filter again, project. What if you want to join after a grouping? What if you want to filter after a project? What if you want to group over a projection? You will have to use the clunky subquery syntax or WITH-clauses.

Compare to LINQ-syntax in C#, where you can just chain the operations however you want.

Another issue is that you can't reuse expressions. If you have an expression in a projection, you will have to repeat the same expression in filters and grouping. This leads to error-prone copy-pasting of expression or more convoluted syntax using subqueries.

Re:How and why the Relational Model works for databases by oblio on Monday January 17, 2022 @05:18AM (#29965105)
And for expression reuse, they're so close with aliases.

lots-of-bla-bla-bla-bla as short-name

But later on you can only refer to short-name from very specific places, as you mention. So 80% of the time you're forced to go lots-of-bla-bla-bla-bla over and over and over again.

Snatching defeat from the jaws of victory.

Re:How and why the Relational Model works for databases by christophilus on Monday January 17, 2022 @07:07AM (#29965750)
I really, really miss LINQ, having moved from C# to Ruby, then Node and Go. LINQ is as close to absolute perfection as I’ve seen in a concept.