From: | Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com> |
---|---|
To: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] Retrieval of OO objects. |
Date: | 1999-04-17 00:34:51 |
Message-ID: | 3717D72B.688C6025@bigfoot.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Oliver Elphick wrote:
> 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.
I guess the point is if you had an Eiffel collection of animals, two
Invertebrates and two vertibrates, and did a save to disk. When you
loaded the collection back in from disk you wouldn't expect to get back
4 animals, whose status as vertibrates or invertibrates is no longer
known.
In a real object database, you could say "Get all the animals", and they
would come back appropriately - some as vertibrates, some as
invertibrates. Since they come back properly we can call methods on
different types of animals and they will behave differently as
appropriate.
--
Chris Bitmead
http://www.bigfoot.com/~chris.bitmead
mailto:chris(dot)bitmead(at)bigfoot(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1999-04-17 04:02:20 | Re: [GENERAL] The WWW of PostgreSQL |
Previous Message | Oliver Elphick | 1999-04-16 17:57:03 | Re: [GENERAL] Retrieval of OO objects. |