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: [EMAIL PROTECTED] | | Jefferson, LA USA | | | | "I'm not a vegetarian because I love animals, I'm a vegetarian | | because I hate vegetables!" | | unknown | +-----------------------------------------------------------------+ ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org