Link to home
Start Free TrialLog in
Avatar of Ok123
Ok123Flag for Belgium

asked on

How to build specifications templates for products table

Hi,
I would like to have some tips regarding tables normalization.
I have a table with 20 k products in electronics, informatics etc etc
Id_product
Description
Price
Etc etc
We are building a web site, and i need to enter spécifications for each product.
In one family of products, we can retrieve almost same specifications but some times one or more spec are different.
For exemple :
A led bulb
Power : 3 watts
Lumen : 250 lumens
Socket : E14
Led technology : SMD
Type of bulb : candle
80 % of the bulbs are the same but we can imagine that one bulb is built with a PIR detector.
So that product will have a spec more.
Now i have mother motherboards, i need another template :
Cpu : xx
Chipset : xx
Slots : xx
ETc etc…
Here also , we can have some different specs some times.
Do you have some tips to build templates and to link them to my products table ?
Tanks
Best regards
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

I'd think you need an Attributes table:

tAttributes
==============
AttributeID
ProductID
AttributeName
AttributeValue

So for the LED bulb, you'd have 5 records in that table. If that "LED Bulb" has a ProductID of "101", then your table would look something like this:

AttID   ProdID  AttName                 AttValue
==========================================================
1	101	Power			3 Watts
2	101	Lumsn			250 Lumens
3	101	Socket			E14
4	101	LED Technology	        SMD
5	101	Type of Bulb	        Candle

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ok123

ASKER

Hi Scott,
It's exactly what i need :-)

Thank you .