News for hackers. Stuff that matters.
Re:Relational is more than SQL by anon84873628 on Saturday September 16, 2023 @05:04PM (#37538685)
You might find Malloy interesting as it makes a greater departure from SQL syntax. Queries are first class objects which can be nested within each other in order to do trellising. It still compiles to SQL because that is the only language accepted by DBMSs today; however it will automatically write symmetric aggregate calculations and do those nestings that are hard for a human to write.

https://www.malloydata.dev/

Re:Relational is more than SQL by ako on Sunday September 17, 2023 @12:10PM (#37546578)
How are views not first class query objects?
Re:Relational is more than SQL by ttfkam on Monday September 18, 2023 @08:18PM (#37564103)
Yup.

"SQL doesn't have first-class query objects and isn't composable."

Uh… views, set-returning functions, temporary tables, CTEs…

"No, not like that! Something not declarative and set-oriented!"

SQL is declarative and set-oriented. 3rd generation language models for data were tried and discarded for good reason decades ago.

"But… but… I don't like set-oriented models! They make me feel dumb. I'm not dumb, so SQL must be dumb. Not meeeeeeeee!!!"