Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Trivial ques-Resolving a Many-to-Many (m:n) Relationship..why reqd

2 posters

Go down

Trivial ques-Resolving a Many-to-Many (m:n) Relationship..why reqd Empty Trivial ques-Resolving a Many-to-Many (m:n) Relationship..why reqd

Post  kapoor_dh Wed Dec 30, 2009 1:38 am

Hi,

This is a very basic cinfusion which I am having.

I have a scenario where the 2 entities are having many to many relationship,I see that it is must to resolve these relationships.

Example : A Fax number directory Entity 1: Person details,Entity 2: Fax numbers,now here a person can be associated with more than one fax numeber and a fax number can be associated with more than one person.

Model 1)
So the entity as of now looks like
E1 (person_id(pk) ,let's assume this makes it unique...other columns)
E2(fax_num(pk),person_id(fk)...other columns)

It is suggested to have another intersection entity E3 and the new relationships will look like

Model 2)
E1 (person_id(pk) ,let's assume this makes it unique...other columns)
E3 (fax_num(pk)(fk),person_id(pk)(fk))
E2(fax_num(pk)... other columns)

Now my question is what if we keep the Model 1) as it is and just make the person_id in E2 as part of the primary key like E2(fax_num(pk),person_id(pk)(fk)...other columns)...may be I am little confused,but to me it looks fine...anyone please comment and give the answer.

kapoor_dh

Posts : 24
Join date : 2009-12-08

Back to top Go down

Trivial ques-Resolving a Many-to-Many (m:n) Relationship..why reqd Empty Re: Trivial ques-Resolving a Many-to-Many (m:n) Relationship..why reqd

Post  BoxesAndLines Wed Dec 30, 2009 11:31 am

All of the other columns in your fax entity are repeated for every person that owns that fax number. With model 1 if an attribute of the Fax entity changes, I will need to update multiple rows.
BoxesAndLines
BoxesAndLines

Posts : 1212
Join date : 2009-02-03
Location : USA

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum