Re: [GENERAL] Imperative Query Languages - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Imperative Query Languages
Date
Msg-id 1437.1499234500@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] Imperative Query Languages  (Jason Dusek <jason.dusek@gmail.com>)
Responses Re: [GENERAL] Imperative Query Languages
List pgsql-general
Jason Dusek <jason.dusek@gmail.com> writes:
> This more of a general interest than specifically Postgres question. Are
> there any “semi-imperative” query languages that have been tried in the
> past? I’m imagining a language where something like this:

> for employee in employees:
>     for department in department:
>         if employee.department == department.department and
>            department.name == "infosec":
>             yield employee.employee, employee.name, employee.location,
> employee.favorite_drink

I'm pretty sure that that is the model that relational databases (and the
SQL language in particular) replaced, back in the 70s or so.  Look up
"network" databases (eg CODASYL) and "hierarchical" DBs (eg IMS) for some
ancient history here.  Yeah, you can do it like that, but it's seriously
painful to develop and maintain.  People were more excited about spending
human effort to save machine cycles forty years ago than they are today.

            regards, tom lane


pgsql-general by date:

Previous
From: John Turner
Date:
Subject: Re: [GENERAL] Imperative Query Languages
Next
From: Chris Travers
Date:
Subject: Re: [GENERAL] Imperative Query Languages