Page 1 of 1

product attributes problem ??

Posted: Mon Sep 17, 2007 12:36 am
by PHPycho
Hello forums !!
while trying to design a database for shopping cart i encountered few problems which i am mentioning here.
I had hierarchical level of categories for products for which i designed table as:
id|title|parent_id
Different products under different cateogries has different attributes ie for example products under
'Clothing' has different attributes than products under 'Music'. It means we cant have static form fields for attributes.I tried to
figure out this table for storing products attributes and values
id|category_id|attribute_name|attribute_type
id|attribute_id|attribute_value
I think this is bit tedious in retrieving and displaying the attribute name and its corrsponding form field type, and also tedious in dynamically inserting, updating etc operations
is there any effective methods for such case ??
I would really appreciate if there is alternative.
Thanks in advance for the comments and suggestions.

Posted: Mon Sep 17, 2007 7:05 am
by feyd
You have found the most likely normalized solution, therefore likely the best to go with.