From: | Guyren Howe <guyren(at)gmail(dot)com> |
---|---|
To: | Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com> |
Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Can we go beyond the standard to make Postgres radically better? |
Date: | 2022-02-11 04:56:06 |
Message-ID: | DD28AF26-F6AF-4082-BA1F-7C802465C5E0@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Feb 10, 2022, at 17:06 , Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com> wrote:
>
>> But SQL is a terrible, no good, very bad language.
>
> I cannot accept such a religious persecution of SQL without a detailed explanation.
>
I feel like anyone who is defending SQL here isn’t aware of how much better the alternatives are, and how bad SQL really is.
I mean: it’s hard to write, hard to read. It’s hard to generate. But that’s just the starting point.
One of the worst things about it that I don’t see much discussed is that it imposes assumptions about the storage model that aren’t part of the relational model. Like heavyweight, hard to change tables with transactional guarantees and such. Don’t get me wrong, those things are great to have available, but I don’t need them all the time.
The whole NoSQL movement has been such a tragedy. Having diagnosed a problem with SQL databases, they threw out the relational model and very often reimplemented a form of SQL when they should have done the opposite. There is no reason you can’t have a relational database with an on-demand schema, with eventual consistency, with all those fun things that various NoSQL databases provide. Those storage models have their place, but the SQL standard says you can’t use them.
But the biggest issue is the verbose, terrible, very bad query language. In the web development community where I spend my time, it is almost holy writ to treat the database as a dumb data bucket, and do everything in the application layer (even things like validations, even when that is a provably incorrect approach). Why? I think it’s because they’re used to working in a pleasant language like Ruby or Python, and they want to do everything there. And who can blame them?
But this is bad. Proper relational design can take over much (most!) of the design of a typical business app, with significant efficiency gains the result. But no *community* is going to choose that when most of the members of the community don’t want to learn SQL and who can blame them?
Another issue: everyone thinks “relational” is the same thing as “SQL”. If we could get folks to break that association, then relations should be a standard feature of high-level programming languages, just as arrays and hashes are.
Heck, give me a functional programming language with a good relational model, and I can implement OOP in that relational language without breaking a sweat.
Software *should* be designed around a logical/relational layer with minimal occasional forays into Turing completeness where necessary. But no-one is even thinking about software like that because relational is SQL and SQL is awful.
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond Brinzer | 2022-02-11 05:15:30 | Re: Can we go beyond the standard to make Postgres radically better? |
Previous Message | Raymond Brinzer | 2022-02-11 04:33:02 | Re: Can we go beyond the standard to make Postgres radically better? |