Re: erd to db

From: Daniel Guntermann <guntermann_at_uswest.net>
Date: Sat, 23 Mar 2002 04:19:41 -0800
Message-ID: <Fa_m8.6$JN1.10619_at_news.uswest.net>


"Jan Hidders" <hidders_at_uia.ua.ac.be> wrote in message news:3c9af4b6$1_at_news.uia.ac.be...
> "Yves Guerin" <yves.guerin_at_muhc.mcgill.ca> wrote in message
> news:bxpm8.7127$R8.88795_at_carnaval.risq.qc.ca...
> >
> > I have question about to map a erd to a ralational <snip>

> I'm not sure what type of ERDs you are talking about, but in the usual
ones
> your problem statement doesn't make sense. First, if W has a primary key
> then it is by definition not a weak entity,

I would have to disagree with your statement, Jan. It's totally possible that several candidate keys exist in W, one of which is termed to primary key (w1), but perhaps another composite candidate key that has one component attribute that is related to the primary key of E also exists. Choosing a primary key from several candidates might be an arbitrary choice, but have significance to a particular designer or user.

and second, there can be no such
> thing as the primary key of a relationship other than that which is
implied
> by the involved entity types (if there would be then it is not a
> relationship but an entity type).

You are probably correct in some sense, at least according to some peoples' definitions. But again, I would unfortunately have to disagree, at least in terms of common acceptance for the terminology. A "relationship" is unfortunately somewhat of an ambiguous term when considering the rather large body of published work on the subject, but in some instances, even in some of E.F Codd's original work, authors seem to imply that a relationship IS an entity type, much like what some people term as a cross-reference, or association entity, and therefore, by extension, a relation (which require at least one candidate key). An example I can readily think of is the SUPPLIER-PART-SHIPMENT examples, where the binary relationship, "each SUPPLIER must ship one or more PARTs" and, "each PART might be shipped by one or more SUPPLIERs" can be broken down into two entities, and believe or not, a binary <relationship>:

Each SHIPMENT includes one PART sourced from one SUPPLIER.

If my memory serves me right, a "relationship" can have properties just like an entity, and looks just like an entity. Thus it does seem confusing enough, and I'm sure subsequent efforts to make the distinction clearer between the two have been made by many.

I'm sure you referring to the explicit binary relationship restricted to the line depicting optionality and degree between only two entities, but in cases where a relationship exists between three entities, then a 'ternary relationship' exists, etc.

 >
> -- Jan Hidders
>
>

Regards,

Daniel Guntermann Received on Sat Mar 23 2002 - 13:19:41 CET

Original text of this message