Database Joins

B

Bob

Hi

This is my last resort! I wonder if annyone can help me.
I have a problem that i cannot fix. I have a database
with customer, orders, stock and supplier. I can join the
customer to order and stock to supplier as i need but i
am unable to join the orders to stock by many to many.
The join keeps going to one to many and it needs to be
many to many to make the database work. Can anybody help
or have any ideas?

Tahnks
 
A

Allen Browne

You cannot create a many-to-many relationship.

To resolve a many-to-many relationship, you need another table. This
junction table will then be one-to-many to the other 2 tables.

The table you need will have these fields:
StockID foreign key to Stock.StockID
OrderID foreign key to Order.OrderID
 

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