Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQEZO-0007pH-B0 for pgsql-general@arkaria.postgresql.org; Tue, 14 Sep 2021 19:58:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mQEZN-00066Q-8N for pgsql-general@arkaria.postgresql.org; Tue, 14 Sep 2021 19:58:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQEZM-00066H-UQ for pgsql-general@lists.postgresql.org; Tue, 14 Sep 2021 19:58:16 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mQEZK-000790-1S for pgsql-general@lists.postgresql.org; Tue, 14 Sep 2021 19:58:16 +0000 Received: by mail-pg1-x52f.google.com with SMTP id q68so276873pga.9 for ; Tue, 14 Sep 2021 12:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version; bh=4avNWr9gww7SGOJs+DVh02Zid85GfDn+Lfoi8+cL2E8=; b=JWuY0i4XyHGm/ehAS95A2mL/FXKd0ZWVH7nrcOcybK8ec8ZkpJ84ECgwNvsPftJfSR ZwXmzCLTUgD1UJnUCWOOQBtFY/LjWyoZv/mEyrJEeUMUM+64rrexDQtc1HGtKKwQIDHF A1uPyKM2GYOApkVJsyoCFvxfRozy5YO5DTwKD/r9ROz/2IPdUyhGlupthC07bHBwO0Pw CQHuVrDgg5eE892RPmnpHXWDqy0C1hqIOEoQNcmjzEHuAkKFzqOL5rEiqI3GRK87ekgI QNHAjqcI03vw5MxHn0sg3z/0TOd1L4/Kphd0AjMPS4EzApMzTnLihGY4t3YHC9JoPu9I PfXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version; bh=4avNWr9gww7SGOJs+DVh02Zid85GfDn+Lfoi8+cL2E8=; b=wTTp66D56fj8anL799o6i8jdf3gFgxtgPVedQRVfZUCKExRuj17P/vwKRKpQMZAePb H5QKG5aM36RazTTlA0q/XXn1VUQGmFPX6yukE/qBDU01O+h0YT9CfXyB9w/2LjK4M3yf EB3M4LGcUKYfNyT6uDU9rQyOtTNK7KayxOcmO3YxvISBwLM6jU8h8MpPav6uqbrJufSH x3eAHxgTAaqwUOOzcL9T/IAJd81wzLSVN6mdSQhQDDc5CCuIfTP9AtffUJwbBmkh3E+9 abdhvLG+CtpOHWzmqYyadoGRO3uXup3nhBRpLJtFJ5bxjPcLTPa6w8Y0A5wIRpGYW28D aw5Q== X-Gm-Message-State: AOAM533TyfJQsoe0McTMiSJ13XdnrdDWCzTWzz16eO0HugaLAF85vVXR gjQY/Pw4sCxbLhuqisl+uvOVNarLXIM= X-Google-Smtp-Source: ABdhPJzqir/7AmYQTqXWEEXYO+BtJWxagFddAV4wMMougenim3c587i88MIhtagrD/Z/9HL4zumpmw== X-Received: by 2002:a63:87c3:: with SMTP id i186mr16656745pge.242.1631649490735; Tue, 14 Sep 2021 12:58:10 -0700 (PDT) Received: from [2600:8801:8800:5:100::] ([2600:8801:8800:5::c]) by smtp.gmail.com with ESMTPSA id i7sm12515957pgd.56.2021.09.14.12.58.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Sep 2021 12:58:10 -0700 (PDT) Date: Tue, 14 Sep 2021 12:57:56 -0700 From: Guyren Howe To: pgsql-general@lists.postgresql.org, Mladen Gogala Message-ID: <62d7895c-a008-4d48-94d5-48aeec23eaf5@Spark> In-Reply-To: <67f0b6d6-9e8d-a27e-ca7c-e91842338180@gmail.com> References: <4dc338ad-b0aa-4f4c-bd9c-4dc76dda9e8b@Spark> <67f0b6d6-9e8d-a27e-ca7c-e91842338180@gmail.com> Subject: Re: The tragedy of SQL X-Readdle-Message-ID: 62d7895c-a008-4d48-94d5-48aeec23eaf5@Spark MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="6140fed0_109cf92e_12d3d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --6140fed0_109cf92e_12d3d Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sep 14, 2021, 12:51 -0700, Mladen Gogala , = wrote: > Replies in-line > On 9/14/21 01:51, Guyren Howe wrote: > > They are making a decent decision. SQL is a *fucking terrible* langua= ge, which I don=E2=80=99t blame them for not wanting to learn. > Based on what criteria=3F Verbosity. Redundancy. Lack of orthogonality. Resemblance to English. The= standard effectively mandates a particular storage strategy, with heavyw= eight tables that must provide certain CAP theorem guarantees instead of = others. Rigid storage limitations: less in Postgres than in others, but w= hy can=E2=80=99t I, say, nest schemas=3F Hell, why can=E2=80=99t I nest r= elations=3F https://www.edgedb.com/blog/we-can-do-better-than-sql > > > > The whole industry, programming languages, infrastructure, everything= would have developed differently if relations were a natural, pleasurabl= e thing to use in any programming language. Like an Array, or a Hash. > > Thee is nothing natural about either relations or arrays and hashes/d= ictionaries. Relations are pretty literal implementation of the basic set= theory. Having a decent understanding of the basic set theory is a condi= tion for understanding SQL. Now, we can discuss whether a language implem= enting a mathematical theory is =22good=22 or =22bad=22, whatever the mea= ning of =22good=22 or =22bad=22 in the given context. Historically, SQL i= s a good fit for the banking business and accounting and that is why it i= s still around. > > Another misconception about SQL is treating it as a general purpose p= rogramming language. SQL is data description language, nothing more, noth= ing less. It doesn't need loops, arrays, hashes or subroutines, its princ= ipal purpose is to describe a subset of data. Without SQL you would have = to read all the data and filter the unnecessary stuff yourself. =46urther= more, part of SQL are so called =22ACID requirements=22. Transaction can = only see the data that was committed before the transaction has begun. Im= plementing ACID takes a lot of code, that's what MVCC is all about. Howev= er, that too has its origins in accounting. You cannot pay the money you = don't have. And the last thing about SQL is transaction management. Witho= ut relational databases and SQL, you would need a proprietary transaction= manager, just like MongoDB. And MongoDB has a complex proprietary transa= ction manager and is losing market share. So, to recapitulate: > > =C2=A0=E2=80=A2 Declarative subset definition > > =C2=A0=E2=80=A2 ACID consistency > > =C2=A0=E2=80=A2 Transaction management > > =C2=A0=E2=80=A2 Ideal fit for accounting. > > That is why SQL is still around. And that is why we all live in a yel= low subroutine (this reference is not for the millennials or younger) You=E2=80=99re confusing SQL with the relational model. Datalog and Quel = and Tutorial D and other database languages and systems can and did provi= de those features also. --6140fed0_109cf92e_12d3d Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On Sep 14, 2021, 12:51 -0700, Mladen Gogala <gog= ala.mladen=40gmail.com>, wrote:
Replies in-line
On 9/14/21 01:51, Guyren Howe wrote:
They are making a decent decision. SQL is a *fucking terrible* language,= which I don=E2=80=99t blame them for not wanting to learn.
Based on what criteria=3F&=23160;
Verbosity. Redundancy. Lack of orthogonality. Resem= blance to English. The standard effectively mandates a particular storage= strategy, with heavyweight tables that must provide certain CAP theorem = guarantees instead of others. Rigid storage limitations: less in Postgres= than in others, but why can=E2=80=99t I, say, nest schemas=3F Hell, why = can=E2=80=99t I nest relations=3F

https://www.edgedb.com/blog/we-can-do-better-than-sq= l

The whole industry, programming languages, infrastructure, everything wou= ld have developed differently if relations were a natural, pleasurable th= ing to use in any programming language. Like an Array, or a Hash.
Thee is nothing natural about either relations or arrays and hashes/dicti= onaries. Relations are pretty literal implementation of the basic set the= ory. Having a decent understanding of the basic set theory is a condition= for understanding SQL. Now, we can discuss whether a language implementi= ng a mathematical theory is =22good=22 or =22bad=22, whatever the meaning= of =22good=22 or =22bad=22 in the given context. Historically, SQL is a = good fit for the banking business and accounting and that is why it is st= ill around.
Another misconception about SQL is treating it as a general purpose progr= amming language. SQL is data description language, nothing more, nothing = less. It doesn't need loops, arrays, hashes or subroutines, its principal= purpose is to describe a subset of data. Without SQL you would have to r= ead all the data and filter the unnecessary stuff yourself. =46urthermore= , part of SQL are so called =22ACID requirements=22. Transaction can only= see the data that was committed before the transaction has begun. Implem= enting ACID takes a lot of code, that's what MVCC is all about. However, = that too has its origins in accounting. You cannot pay the money you don'= t have. And the last thing about SQL is transaction management. Without r= elational databases and SQL, you would need a proprietary transaction man= ager, just like MongoDB. And MongoDB has a complex proprietary transactio= n manager and is losing market share. So, to recapitulate:
&=23160;=E2=80=A2 Declarative subset definition
&=23160;=E2=80=A2 ACID consistency
&=23160;=E2=80=A2 Transaction management
&=23160;=E2=80=A2 Ideal fit for accounting.
That is why SQL is still around. And that is why we all live in a yellow = subroutine (this reference is not for the millennials or younger)
You=E2=80=99re confusing SQL with the relational mo= del. Datalog and Quel and Tutorial D and other database languages and sys= tems can and did provide those features also.
--6140fed0_109cf92e_12d3d--