Hi,

Terence Ng wrote:
Hi!

I would like to create a database for products
catalogue.  I have many products with different
specification.

e.g.
lamp A: Part no, Color, Raw Material, Wave length,
Vf(V)20mA, lv(ucd)10mA

ECG:Part no, Type, Iv, KHz, A, W, Im

Should I put these products in one table, or in
separate?

Several posibilities. One I'd give a go would be one table for products and their common data

products (products_id int8, description text, ...);

attributenames (attr_id int4, importance int2, attrname text (or attrname int4 pointing to translation table)
,unit_id)


attributeunits (unit_id int4, unitname text, baseunit_id int4, factor numeric)

attributes (product_id int8, attr_id int4, unit_id int4, attrtxt text,
attrvalue numeric)


I think you get the picture :-)


Good luck
Tino Wildenhain



---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to