var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Many to Many relationship
I have a two tables. One is Product and another is Supplier.
I would like establish a Many To Many relation between this to.
One product can supply by many suppplier and at the same time one supplier can supply many product.
Could any one please help me how to establish the same?
Thanks with Regards,
This looks to much like homework. So us your ideas and then we will help you. We dont do homework on this forum.
You do not need a parachute to skydive. You only need a parachute to skydive twice.
the many-to-many table looks like this --
@beilstwh: yes, it looks like homework, but it also looks like a dumbed-down example of two completely different tables
CREATE TABLE product_suppliers
( product_id INTEGER NOT NULL
, supplier_id INTEGER NOT NULL
, FOREIGN KEY ( product_id ) REFERENCES products ( product_id )
, FOREIGN KEY ( supplier_id ) REFERENCES suppliers ( supplier_id )
, PRIMARY KEY ( product_id, supplier_id )