News for hackers. Stuff that matters.
Re:A Critique of SQL, 40 Years Later by vbezhenar on Wednesday August 24, 2022 @12:37PM (#32581940)
You don’t do outer joins.
Re:A Critique of SQL, 40 Years Later by Koshkin on Wednesday August 24, 2022 @01:24PM (#32582716)
Don’t these exist for a reason?
Re:A Critique of SQL, 40 Years Later by ErwinSmout on Saturday August 27, 2022 @03:21PM (#32622171)
Yes. The reason is lazy people expect to be able to ask five questions in one go and expect one single answer to answer all five of them.

The key is to realize that submitting a query is to ask a question. So how many queries to you think you have to issue if the number of questions you have is five ?

It is technically perfectly possible to "ask five questions at the same time" to any given truly relational DBMS. Said DBMS will give five answers at the same time (and not leave you to guess which answer corresponds to which question). That SQL doesn't do it, does not mean it's impossible.

Re:A Critique of SQL, 40 Years Later by andy81 on Wednesday August 24, 2022 @03:47PM (#32584790)
Of course.

You've got a list of countries and are pulling each country's national flower, national bird, largest port city etc.

Without outer joins, Liechtenstein with no ports doesn't show in the list at all. Sad news for people who want to know all countries, or Liechtenstein's national bird (eagle).

Re:A Critique of SQL, 40 Years Later by vbezhenar on Wednesday August 24, 2022 @04:03PM (#32585020)
You’re not obliged to pull everything in one request. You can issue several requests.
Re:A Critique of SQL, 40 Years Later by tremon on Wednesday August 24, 2022 @04:15PM (#32585162)
Sure. You're also not obligated to include a WHERE-clause in the query you send to your database. You can do the filtering in the application.
Re:A Critique of SQL, 40 Years Later by vbezhenar on Wednesday August 24, 2022 @06:17PM (#32586543)
What's your point? You can live without nulls, they're not required and you don't need to avoid WHERE-clause for that. It's a theoretical concept, nobody in sane mind would do that, but nulls are not required for relational algebra.
Re:A Critique of SQL, 40 Years Later by tremon on Thursday August 25, 2022 @05:43AM (#32591542)
You started this subthread by asserting that one shouldn't use outer joins, and when other people pointed out valid use cases for outer joins, you advocated to use application logic to work around your refusal to use them.

My response was just to point out the absurdity of your premise.