var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Help with database design
I've 4 tables, ItemCategory, Items, DiamondCategoy and Diamonds.
The user store item details and specify whether or not it has a diamond on, for example:
If there is a diamond then:
So R1 of Ring has D1 of Round
An Item could have no diamonds, for example:
I can't figure out how to design the relationships. I came up with this solution, correct me if I'm wrong.
c_Id >> PK
p_Id >> PK
c_Id >> FK
d_Id >> FK
d_Id >> PK
dc_Id >> FK
dc_Id >> PK
Is that correct?.
A diamond can only be on one ring, but a ring can have multiple diamonds. Instead of having a diamond ID in the Items table put an item ID in the diamond table. Otherwise I think it looks right.
Tags for this Thread