Re: OO Patch - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: OO Patch
Date
Msg-id Pine.LNX.4.21.0005201305340.392-100000@localhost.localdomain
Whole thread Raw
In response to OO Patch  (Chris <chris@bitmead.com>)
List 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@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Re: Postgresql OO Patch
Next
From: Peter Eisentraut
Date:
Subject: Re: [GENERAL] Question about databases in alternate locations...