Re: [GENERAL] Retrieval of OO objects.

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Retrieval of OO objects.
Date: 1999-04-16 17:57:03
Message-ID: 199904161757.SAA03171@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Bitmead wrote:
>Oliver Elphick wrote:
>
>> This is in line with standard OO treatment of inherited classes.
>> Class aaa only has a single feature, a; it knows nothing about additional
>> features of descendant classes.
>
>But if you are say, using postgres to construct some C++ classes for
>types bbb and ccc, you would want to be able to get access to fields b
>and c so that you can construct your classes appropriately. This is how
>real object databases work.

[bbb and ccc both inherit from aaa.]

If you need features of bbb and ccc you must use those classes, not their
ancestor.

Class bbb knows about a and b and class ccc knows about a and c, but
aaa doesn't know about b and c because they are not defined in aaa.

`Vertebrate' is a descendant class of `animal'. `Vertebrate' has a feature
`bones', but `animal' doesn't, because the majority of animals don't have
bones at all.

This is how inheritance works in the Eiffel language, at least.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"But seek ye first the kingdom of God, and his
righteousness; and all these things shall be added
unto you." Matthew 6:33

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Bitmead 1999-04-17 00:34:51 Re: [GENERAL] Retrieval of OO objects.
Previous Message Statistical Solutions 1999-04-16 16:42:43 Re: [GENERAL] The WWW of PostgreSQL