Re: database design of products catalogue

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: database design of products catalogue
Дата
Msg-id 3F1BDF45.8020403@wildenhain.de
обсуждение исходный текст
Ответ на database design of products catalogue  (Terence Ng <ngterry2000@yahoo.com.hk>)
Список 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 по дате отправления:

Предыдущее
От: Terence Ng
Дата:
Сообщение: database design of products catalogue
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: database design of products catalogue