relationship : My stupid question...

Janjang

Registered User.
Local time
Today, 12:35
Joined
Oct 17, 2005
Messages
80
i use Ms Access 2000 (home)& 2002 (office)..
can i choose type of relationshp manually..
i mean i can change ony-to-many to many-to-many or some thing like that...
if it possible, how...
plz help me...
 
You cannot have a many to many.

If you need to change relationships then I suggest that there is a design problem with your database. In the best regulated world relationships are one to many with referential integrity enforced. One to One do occurr but rarely.

L
 
Len Boorman said:
You cannot have a many to many.

so, how bout this...
1 customer can buy many parts at once...
and 1 part can be bought by many customers..

at my relation that i create , only part have many customer but not for customer....help me plz..
 
Customer to Parts is M:M
Parts to Customer is M:M
Therefore you decompose with an intermediate table
New Table is CustomerParts
Take PK from each participating table to form PK in New table.

Customer to CustomerParts is 1:M
Parts to CustomerParts is 1:M

This is not the end however. I suspect that you will need additional fields in the new table. Maybe Order Ref, Qty etc. The new table may effectively your order table

Len

Len
 
The relationship between the dat is not determined by Access, it's a question of fact. By choosing where to hold the foreign keys determines how Access views the relationship, but the only thing you change change, really, is the join.

When Les says you can't have a many to many relationship, he means that simply having two joined tables will not model this. As he says, you need a third table, usually called a junction table, to implement a m:m relationship in your database.
 

Users who are viewing this thread

Back
Top Bottom