Question on Structuring Product Attributes

From: Yadda <yadda_at_nospam.net>
Date: Mon, 03 Oct 2011 07:54:52 -0500
Message-ID: <9etpksFnvtU1_at_mid.individual.net>



Hello,

I have a question on how to efficiently implement a product database table structure. I have products grouped into Categories which is the highest level grouping by attribute. Products across Categories share some attributes in some cases, e.g. Diameter and Color. I need to have each attribute have a proper data type, e.g. Diameter is of type DECIMAL and Color is of type CHARACTER. I will also have to have standard stored queries to inquire on these products according to attribute(s). Over time new product with new types of attributes may be added.

One way is to just define the attribute in the Product table and then have a table to define what attributes are applicable to a Product Category. How ever this table field could get quite large then. However, I don't think breaking attributes out into separate attribute tables is a good idea because of the stored query requirement and it would require more structure changes over time.

I would be curious to read others' opinions on this design issue as it must be very common.

Thank you
Alex Received on Mon Oct 03 2011 - 14:54:52 CEST

Original text of this message