Author |
Topic  |
|
Rob.B
New Member

Netherlands
93 Posts |
Posted - 11 November 2002 : 05:54:39
|
Another question again 
I'm working on a price-compare site and i've created a DB for it.

As you can see there should be two many-to-many relationsships between 2 tables. The problem is dat i cannot create many-to-many relations between those tables. Only one-to-many. Is the structure right? I've read the help in access.
|
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 11 November 2002 : 17:50:16
|
Why do you say you need N:M relationships between T_PRODUCTS and T_COLLECT and T_COLLECT and T_SUPPLIER? The relationships look 1:M to me: A record in the T_PRODUCTS table can have several related records in the T_COLLECT table, but a record in the T_COLLECT table will only have a single related record in the T_PRODUCTS table. Also a record in the T_SUPPLIER table can have several related records in the T_COLLECT table but each record in the T_COLLECT table will only have a related record in the T_SUPPLIER table.
|
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
Rob.B
New Member

Netherlands
93 Posts |
Posted - 12 November 2002 : 05:46:50
|
Seems logical to me.
I also discussed this (before i aksed this question here) with somebody else and his theory is:
T_COLLECT.P_ID < N:M > T_PRODUCTS.P_ID T_COLLECT.S_ID < N:M > T_SUPPLIERS.S_ID
A supplier can have several products and a product can be sold by serveral suppliers
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 12 November 2002 : 06:22:00
|
quote: Originally posted by Rob.B
I also discussed this (before i aksed this question here) with somebody else and his theory is:
T_COLLECT.P_ID < N:M > T_PRODUCTS.P_ID T_COLLECT.S_ID < N:M > T_SUPPLIERS.S_ID
A supplier can have several products and a product can be sold by serveral suppliers
The N:M relationship is between the products and suppliers, let's say, in a ER diagram, before translating that ER diagram to a physical model, i.e., to tables in the database. So a N:M relationship in a ER model translates to two 1:M relationships in a physical model, just like the ones you have: T_PRODUCTS<->T_COLLECT, T_COLLECT<->T_SUPPLIERS. So a N:M relationship between two tables in an ER diagrama translates to three tables in a physical model. In a physical model, it's never possible to have a N:M relationship, unless the tables were not normalized, which is something that, in this respect, should be avoided at all times. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
|
Topic  |
|