Re: database design of products catalogue - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: database design of products catalogue
Date
Msg-id 3F1BDF45.8020403@wildenhain.de
Whole thread Raw
In response to database design of products catalogue  (Terence Ng <ngterry2000@yahoo.com.hk>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Terence Ng
Date:
Subject: database design of products catalogue
Next
From: Ron Johnson
Date:
Subject: Re: database design of products catalogue