| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: erd to db
Thanks Jan, for answering. I'm afraid I was not clear. I meant the following
constallation
[BOOKING] -- (N) -- <ROLE> -- (M) -- [ADDRESS]
where the relationship <ROLE> have an attribute (TYPE). Both entities BOOKING and ADRESS are strong entities having both a primary key consisting of an attribute (IDENT) for the booking number or customer id resp.
Transforming this into relational schema <ROLE> can be modelled by an entity [ROLE] having a (primary) key consisting of the attributes (BOOKING.IDENT, ADDRESS.IDENT) at least.
The question is: How can I model the ERM that the transformation into the RS includes (TYPE) into the primary key of [ROLE]? There should be a notion of a key for a relationship ... iff "multi-valued" relationships are allowed.
Thanks. - Michael
"Jan Hidders" <hidders_at_uia.ua.ac.be> schrieb im Newsbeitrag
news:3c9f260d$1_at_news.uia.ac.be...
> "Michael Gruebsch" <michael.gruebsch_at_pentaprisma.com> wrote in message
> news:a7n695$mgkt6$1_at_ID-71391.news.dfncis.de...
> > "Jan Hidders" <hidders_at_uia.ua.ac.be> wrote in
> > news:3c9af4b6$1_at_news.uia.ac.be...
> > > ... 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 ...
> >
> > What about the following example of a travel agency for disabled
persons.
> >
> > * there is an entity of addresses
> > * there is an entity of bookings belonging to a certain journey
> > * for each booking you can specify up to three addresses playing
different
> > roles:
> > participant, person in charge, contact (e.g.: Mr X [participiant] is
> > accompanied
> > on that journey by Mr Y while the contact adress is that of Mr X's
> > parents)
> >
> > I have modelled this in ERM as the entity BOOKING, the entity ADRESS
> > and a N:M relationship ROLE which has an attribute TYPE defined as
> > either being 'participiant', 'person in charge' or 'contact'. To make
sure
> > that for each TYPE there is only one pair (BOOKING, ADRESS) the
> > TYPE attribute is defined as (part of a week) key for that relationship.
>
>
>
>
![]() |
![]() |