While I'm not expert what I would do is something like this

Items table
fields: item_id  item_name

Attributes table
fields: attribute_id  attribute_name

Item_Attr table
fields: item_id  attribute_id  attribute_value

Now an item can be associated with any number of attributes.


03/12/2002 13:17:15, "Ries van Twisk" <[EMAIL PROTECTED]> 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
>





---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to