From: gkiourtas michail <michgkio@otenet.gr>
Newsgroups: comp.databases.theory
Subject: Re: Missing entity types
Date: Sat, 18 Nov 2000 14:54:16 +0200
Organization: National Technical University of Athens, Greece
Lines: 65
Message-ID: <3A167BF8.7E34DBC6@otenet.gr>
References: <3A1456BE.56ADE281@otenet.gr> <8v4fub$f3t$1@news.tue.nl>
NNTP-Posting-Host: athe530-i149.otenet.gr
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: ulysses.noc.ntua.gr 974551955 42008 195.167.111.149 (18 Nov 2000 12:52:35 GMT)
X-Complaints-To: abuse@ntua.gr
NNTP-Posting-Date: 18 Nov 2000 12:52:35 GMT
X-Mailer: Mozilla 4.6 [en] (Win95; I)
X-Accept-Language: en,el




Jan Hidders wrote:

> gkiourtas michail  wrote:
> > -=-=-=-=-=-
> >
> > Could you please elucidate the following subjects?
> > A. One simple way to check for missing entity types involves examining
> > each existing entity type to determine if any
> >      of its attributes has a 'generic key attribute'in its suffix that
> > could imply a missing entity type.That is,if an attribute,
> >       Ai,j of entity type, Ei ,is of the form Att_Generic-Key-Attribute,
> > it might be th case that Att should be a new entity type,
> >      Ek. If so, then a relationship should exist between Ei and Ek.
>
> I have to guess here because it is not clear to me what a 'generic key
> attribute' or something of the form Att_Generic-Key-Attribute is, but I
> think they are trying to tell you that if the value of a certain
> attribute is an identifier then this attribute should actually
> be an binary relationship between the entity and some other entity
> type. So if you have the attribute Animal.owner that is a generic key
> attribute then you should probably introduce an entity type Owner and
> replace the attribute with the relationship Animal.owned-by.Owner.
>
> I don't know if this does make any sense to you but if it doesn't then
> I would like to ask you to give me an example of an attribute of the
> form Att_Generic-Key-Attribute.
>
> > B. A situation where it becomes important to distinguish between
> > entities and attributes is when an attrribute Ai,j, of
> >      entity type, Ei, is the name of another entity type, Ek.
> >       When this occurs, two possibilities exist:
> >     1. The entity type, Ek, is needed for the unique identification of
> > Ei. Then Ai,j , should be replaced by the primary
> >          key attribute(s) of Ek.
> >      2.  The entity type, Ek, is not needed as part of the key of Ei.
> > Then, the attribute is really suggesting a relationship
> >          between the two entity types.
>
> If you have the attribute Order.client (the client who made the order)
> and you also have the entity type Client then there is probably
> something wrong. You should then replace this attribute with the
> relationship Order.by.Client, except when the attribute is a part of
> the key. In the latter case you replace it it with the key of Client.
> So, of the entity type Client has the key Client.client-number then you
> replace Order.client with Order.client-number.
>
> By the way, I don't agree with the exception that your book makes here.
> You should always replace the attribute with a relationship. But that
> is just my opinion. I am getting curioser and curioser about what book
> you are using. Would you like to tell me?
>
> Kind regards,
>
>     Jan Hidders

   Yes.It is not a textbook.It is the article "Relational database design
based on the Entity-Relationship
    model" by Storey DATA &AND KNOWLEDGE ENGINEERING VOL 7 pages 47-83
   Thanks for your help.





