Re: [GENERAL] Retrieval of OO objects. - Mailing list pgsql-general

From Oliver Elphick
Subject Re: [GENERAL] Retrieval of OO objects.
Date
Msg-id 199904161757.SAA03171@linda.lfix.co.uk
Whole thread Raw
In response to Re: [GENERAL] Retrieval of OO objects.  (Chris Bitmead <chris.bitmead@bigfoot.com>)
List 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.Elphick@lfix.co.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



pgsql-general by date:

Previous
From: Statistical Solutions
Date:
Subject: Re: [GENERAL] The WWW of PostgreSQL
Next
From: Chris Bitmead
Date:
Subject: Re: [GENERAL] Retrieval of OO objects.