This topic is locked

'many to many' implementation

6/3/2009 5:25:31 AM
PHPRunner General questions
F
fabriceaka author

Hello,
bearing in mind I'm new to DBs and PHPRunner, here is my issue :
I have a table of products. Products number grows for each "store".

Each product contains multiple parts (from 1 to 50 let say).

Parts can be bespoke for a certain product or can be found in many products.
From what I gather, this is called a "many to many" relatioonship.
So my problems are :

  • Products and Parts cannot have a strict master detail relationship otherwises individual parts become

    exclusively attached to each product but I need to reuse some parts for other products...
  • how to make an easy data entry for this type of things. If I have a new part that goes in 100 of my products for example.
    Thanks in advance,

    F.

J
Jane 6/3/2009

Hi,
PHPRunner doesn't have any special support for many-to-many relationships.

In general you need to create third table where key values from your tables will be stored. This table is used to link products and product_parts tables.

Then use this table in the master-detail relationships in PHPRunner.