Re: Imperative Query Languages

From: "dandl" <david(at)andl(dot)org>
To: "'Merlin Moncure'" <mmoncure(at)gmail(dot)com>, "'Christopher Browne'" <cbbrowne(at)gmail(dot)com>
Cc: "'Jason Dusek'" <jason(dot)dusek(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Imperative Query Languages
Date: 2017-07-11 13:58:15
Message-ID: 001001d2fa4d$bffd9ae0$3ff8d0a0$@andl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Merlin Moncure

> It's probably of broader interest to consider some sort of "more relational"
> language that would, in effect, be "more declarative" as opposed to
> "more imperative" than SQL. (I'd not be keen on heading back to
> CODASYL!!!)
>
> The notable example of such would be the "Tutorial D" language
> attributable to Darwen and Date's "Third Manifesto"
>
> https://en.wikipedia.org/wiki/D_(data_language_specification)
> http://wiki.c2.com/?TutorialDee
>
> Unfortunately, the attempts to construct implementations of D have all
> pretty much remained at the "toy" point, experiments that few beyond
> the implementors seem to treat as realistic SQL successors.
>
> Another option, in principle, would be to consider QUEL, which was
> what Stonebraker used initially as the query languages for Ingres and
> Postgres.
>
> https://en.wikipedia.org/wiki/QUEL_query_languages
>
> None of these options seem to be dominantly better than SQL, and for
> something to supplant SQL, it would need to be a fair bit better.

I'd like to see a SQL variant (maybe preprocessed) with an algebraic syntax. My biggest gripes with SQL are all the keywords (there are other spoken languages than English??) and the unnecessarily irregular syntax.

If you want a comprehensive list of what's wrong with SQL, it's easy enough to find. The list is long, but near the top are the failure to adhere to the relational model, NULLs, and language design (irregular syntax, etc). But SQL is deeply embedded and currently there are no competitors in its space. In the academic arena Datalog is preferred, and there are solid commercial implementations.

It's easy enough to pre-process your own syntax, and Andl effectively does that by generating SQL on Postgres and SQLite. But that doesn't provide enough benefits on its own, and displacing SQL from any of the places it's currently used is not going to happen any time soon.

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Seamus Abshere 2017-07-11 15:36:17 Does a row lock taken out in a CTE stay in place?
Previous Message Merlin Moncure 2017-07-11 12:36:33 Re: Imperative Query Languages