Re: OO Patch

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Chris <chris(at)bitmead(dot)com>
Cc: Postgres Hackers List <hackers(at)postgresql(dot)org>
Subject: Re: OO Patch
Date: 2000-05-20 13:35:23
Message-ID: Pine.LNX.4.21.0005201305340.392-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chris Bitmead writes:

[ONLY]
> For UPDATE and DELETE it is absolutely correct, and useful, not to
> mention absolutely essential.

Could you explain how and why, preferably with a concrete example? I am
still at a loss.

> > the `SELECT **' syntax (bad idea, IMO),
>
> Why is it a bad idea (considering that every ODBMS on the planet does
> this)?

First of all, ODBMS and [O]RDBMS are not necessarily infinitely compatible
concepts. An ORDBMS is an RDBMS extended with OO'ish features such as
table inheritance and abstract data types to make data modeling easier for
those who like it. But below it all there's still relational algebra and
friends. An ODBMS is a paradigm shift to get rid of some restrictions in
relational databases, both technical and theoretical, the implication of
which is that it's no longer a relational database. Please correct me if
I'm wrong.

Specifically, a query on a relational database always returns a table, and
a table is a set of rows with the same number and types of columns. This
is a pretty fundamental assumption, and even accounting for the
possibility that it might be broken somehow is going to be a major effort
throughout the entire system.

Now a question in particular. I understand that this syntax might
give me some rows (a, b, c) and others (a, b, c, d, e) and perhaps others
(a, b, c, f, g, h). Now what would be the syntax for getting only (b, c),
(b, c, e) and (b, c, h)?

Finally, it seems that the same effect can be obtained with a UNION query,
padding with NULLs where necessary and perhaps judicious use of
CORRESPONDING. What would be wrong with that?

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-05-20 13:35:58 Re: Question about databases in alternate locations...
Previous Message Bruce Momjian 2000-05-20 13:33:11 plpgsql chapter in docs