Re: object algebra

From: Patrick Schaaf <mailer-daemon_at_bof.de>
Date: 25 Feb 2004 08:26:17 GMT
Message-ID: <403c5c29$0$143$9b622d9e_at_news.freenet.de>


"Marshall Spight" <mspight_at_dnai.com> writes:

>"Neo" <neo55592_at_hotmail.com> wrote in message news:4b45d3ad.0402241308.680a4901@posting.google.com...
>>
>> Sometimes it is reality doing the hand-waving. For example a person
>> may not have any eyes, but the relation's heading has eyeColor
>> defined.

>But it wasn't reality that defined that relation, it was you! *You*
>declared that all persons have an eye color, so it doesn't seem
>fair to complain about that fact now.

>And anyway, what's so hard about declaring something like
>enum EYE_COLOR { Blue, Green, Brown, Hazel, Gaping_Unblinking_Sockets }

>Hey, what if the person's eyes are of two different colors? Or what
>if they only have one eye; don't we want to record that too?

That's awful. To me it is obvious that, if that part of reality needs detailed modelling, there should be a class "eye", with an attribute "color" that's fixed for a given point in the lifetime of the object (eye color can change!), and that the separate object of class "head" may have, at any point in time, a reference to zero, one, or two instances of class "eye".

Such modelling, to me, may make real sense in the context of e.g. a medical database. Including the possibility to relocate an "eye" instance from one "head" to another. Including the possibility that an "eye" is not attached to any "head", but instead to a "cooling container".

(play blade runner theme song here)

best regards
  Patrick Received on Wed Feb 25 2004 - 09:26:17 CET

Original text of this message