[thelist] RE: DB question: product attributes

david lloyd parker david at image2image.co.uk
Fri Apr 26 02:37:00 CDT 2002


The only way I can see of referencing allowed combinations is by having some
sort of key in the attribute_name and attribute_value fields that matches
yet another key in the product table. This is just as complicated as what
you arrived at. Personally, it might mean a lot more entries in the table,
but I would go for a unique product ID for every value combination and keep
it in the one table. That would be easy to set up and maintain, less 'logic'
at run time, and would allow much easier addition of an out of stock flag.
The fact that there are a limited number of products would mean there wasn't
much overhead finding the correct record.
Sorry it's not an eloquent solution but I tend to think in a linear fashion!





More information about the thelist mailing list