table relationships

L

Lori

I have managed to relate two tables but I am having trouble relating my other
tables. I need help with many to many relations.... I think.
 
J

Jerry Whittle

You fix Many-To-Many joins by adding a third bridging or linking table. For
example an Assembly can have many Parts. Also a Part can be used in many
Assemblies. This is a classic M-M relationship and relational databases work
best with 1-M relationships.

This third bridging or linking table has foreign key fields for something
like the PartNo from the Parts table primary key and AssemblyID which matches
the Assembly table primary key. This combination could be the primary key for
the table or at least a unique index to prevent duplicates. You could also
have a field for PartCount as an Assembly could use dozens of the same screws
for example.

With this bridging or linking table, you can ask questions in both
directions such as “this assembly uses which parts†or “this part is used on
which assemblies†by joining the three tables together in a query
 
R

Roger Carlson

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top