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

From Ron Johnson
Subject Re: database design of products catalogue
Date
Msg-id 1058792510.7157.143.camel@haggis
Whole thread Raw
In response to database design of products catalogue  (Terence Ng <ngterry2000@yahoo.com.hk>)
List pgsql-general
On Mon, 2003-07-21 at 07:04, 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?

You need a good book/web site on database design and normalization.

*Basically*, though, every item that describes a product should go
in the "product" table.  Then, every different color (and, say,
whether it pertains to "lamp" or "desk") should go in a "color"
table.  Likewise with "raw_material", "wavelength" and "voltage"
tables.

Then, using Foreign Keys, you can link the product table to the
static fact tables to ensure the integrity of the data.

--
+-----------------------------------------------------------------+
| Ron Johnson, Jr.        Home: ron.l.johnson@cox.net             |
| Jefferson, LA  USA                                              |
|                                                                 |
| "I'm not a vegetarian because I love animals, I'm a vegetarian  |
|  because I hate vegetables!"                                    |
|    unknown                                                      |
+-----------------------------------------------------------------+



pgsql-general by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: database design of products catalogue
Next
From: Raymond
Date:
Subject: NEW Used in Non-Rule Query