Hello,
I was wondering what would be the most elegant way to define one-to-one master-details relations in the PHPrunner.
Let's take an example: say I'm selling pens and rulers. I put them both in the general products list, but for every product type I create a different table for the description of that particular type:
- pens do write in a certain color which you can or cannot refill
- rulers have a certain length with a certain division
Assume I have following tables:
products [id,pn,type<pen, ruler>,...]
pens[id,color,refill,...]
rulers [id,length,resolution,...]
So one product should correspond to exactly one description, and this description should be read from the appropriate data table depending on the product type.
Thanks for your help!
Ken