Re: [OT] Inventory systems (private)
От | Dan MacNeil |
---|---|
Тема | Re: [OT] Inventory systems (private) |
Дата | |
Msg-id | Pine.LNX.4.44.0212030959580.15959-100000@brave.cs.uml.edu обсуждение исходный текст |
Ответ на | [OT] Inventory systems (private) ("Ries van Twisk" <ries@jongert.nl>) |
Список | pgsql-sql |
You might create a seperate attribute tables. table: items id name table: attributes id description table: item_attributes item_id attribute_id SELECTitems.name, attributes.description FROMitems, attributes, item_attributes WHERE items.id=item_attributes.item_idAND item_attributes.item_id = attributes.id; If some items are also attributes of other items (a car has an engine) you might look at tree structures. Of course there are already existing inventory systems that it might be cheaper to use than to grow your own. On Tue, 3 Dec 2002, Ries van Twisk wrote: > Hi All, > > is there any whitepaper, document or website that can point me to how to > setup a inventory system? > I'm particulary interested how other people solve the problem of a unknown > number of attributes to a inventory item. > > example: > BAL <-- Inventory Item > - Color <- Attribute > - Diameter <- Attribute > - Weight <- Attribute > > Car <-- Inventory Item > - Speed <- Attribute > - Size <- Attribute > - Weight <- Attribute > - Color <- Attribute > > Computer <-- Inventory Item > - Brand <- Attribute > - Weight <- Attribute > - Windows/Linux <- Attribute > > > I can ofcource add any number of columns to a table but for a lot of items > there will be a lot of NULL values and currently I don't know how many > attrubutes one item can have (possible between 10 and 20). This can even > change in feature opon request. > > Ries > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster >
В списке pgsql-sql по дате отправления: