Re: domain questionnaire

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: 24 Feb 2001 12:45:02 GMT
Message-ID: <978ace$465$1_at_news.tue.nl>


JRStern wrote:
> Jan Hidders wrote:
> >JRStern wrote:
> >>
> >> How can you compare two objects, if you don't have their
> >> identities separate before hand?
> >
> >By having some way to refer to them. That is not the same as knowing
> >how to identify them, i.e., determine if two references refer to the
> >same object. You know, "morning star", et cetera.
>
> We're getting very Lewis Carroll here, "What do you call the name of
> the song?" she asked. There are many, many subtle complexities. How
> would you model the morning star issue in relational terms? <g>

Well, deciding how the tables will look is not a problem. In both cases you get a table with a PK 'name' and some attributes of the planet. But where you might go wrong is in the interpretation of this table. What does a record mean? The wrong interpretation is that every record represents a different planet. The right interpretation is that every record represents the fact that a certain planet with that name has the attributes as mentioned in the record.

> >Sure, you can, and as far as I know most formal object-based data
> >models do. But the question is if you should introduce a design
> >principle that says something like "for every class you have to have
> >some predicate that is expressed in terms of the schema, that
> >decides when two objects in this classe are one and the same
> >object".
>
> Yup, that's the question, or at least a major question. As you say,
> most object systems do this, ... but most relational systems have not,
> at least it wasn't within the standard.

I think it is. It is covered by the rule that you always have to have a primary key.

> Once you allow for identity, you may need to reify other things that
> relational has always treated as metadata -- timestamps and ordering
> come to mind.

I don't really agree. For introducing time stamps you don't need to change the relational model. You just need to reconsider very carefully what exactly the facts are that every record represents.

-- 
  Jan Hidders
Received on Sat Feb 24 2001 - 13:45:02 CET

Original text of this message