From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: database design of products catalogue |
Date: | 2003-07-21 13:01:50 |
Message-ID: | 1058792510.7157.143.camel@haggis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)l(dot)johnson(at)cox(dot)net |
| Jefferson, LA USA |
| |
| "I'm not a vegetarian because I love animals, I'm a vegetarian |
| because I hate vegetables!" |
| unknown |
+-----------------------------------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond | 2003-07-21 13:36:20 | NEW Used in Non-Rule Query |
Previous Message | Tino Wildenhain | 2003-07-21 12:40:37 | Re: database design of products catalogue |