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