pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Chris Bitmead <chris@bitmead.com>
Cc: Robert B. Easter <reaster@comptechnews.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Subject: Re: Thus spoke SQL3 (on OO)
Date: Sun, 21 May 2000 21:50:48 +0300
Message-ID: <39283008.ED83E94@tm.ee> (raw)
References: <Pine.LNX.4.21.0005201507330.423-100000@localhost.localdomain>
	<00052104000003.14806@comptechnews>
	<392830DA.B5546EF7@bitmead.com>
	<00052108053904.14806@comptechnews>
	<39286B3F.F4594E40@bitmead.com>

Chris Bitmead wrote:
> 
> "Robert B. Easter" wrote:
> 
> > I guess the major difference is that the hierarchial-model does not
> > support multiple inheritance.
> 
> I don't agree. From SQL3...
> 
> "To avoid name clashes, a subtype can rename selected components of the
> representation inherited from its direct supertypes."
> 
> and if that doesn't clinch it...

Chris, what is your position on having a single primary key for all 
inherited columns ?

It seems right for single inheritance (tree-like), but generally 
impossible for multiple inheritance, unless we will allow multiple
"primary" keys (which we could allow anyhow, as they seem useful even in 
several non-OO situations). For purity we could set the syntax to be 
ALTERNATE KEY or ALTERNATE PRIMARY KEY, but they would really be 
still primary keys ;) 

> > Passing different row types to the
> > client from one select, forces that client to be like the C++ function
> > programmed in advance to deal with some derived class too.
> 
> You are assuming that the client application will be responsible for
> dealing with these differences. What really happens is that a query is
> more like a List<Baseclass> in C++. As long as you only call methods
> contained in Baseclass on each element of the List, you are ok.

For more dynamic client languages you could even first ask each object 
to enumerate methods it knows about and then perhaps make a separate
menu 
(combobox) from them for client to choose from for each instance.

------------
Hannu



view thread (23+ messages)  latest in thread

Message-ID: <39283008.ED83E94@tm.ee>
Permalink:  ../39283008.ED83E94@tm.ee/
Also on:    postgresql.org/message-id/39283008.ED83E94@tm.ee

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: hannu@tm.ee, chris@bitmead.com, reaster@comptechnews.com, peter_e@gmx.net
  Subject: Re: Thus spoke SQL3 (on OO)
  In-Reply-To: <39283008.ED83E94@tm.ee>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox