Re: Need some help in data design

From: Kyle Lahnakoski <kyle_at_arcavia.com>
Date: 2000/03/11
Message-ID: <38CA2A61.A612F4A_at_arcavia.com>#1/1


masnani_at_my-deja.com wrote:

> Here is the problem -
>
> The application needs to be able to accept input from users about items
> they want to be sold using an auction site. The main problem is to be
> able to acquire all possible attributes about these items since these
> attributes will be used for making decisions.
> For eg. We would like to track, all attributes of a product like a
> watch (manufacturer,model, color etc.).A user can submit any kind of
> product including services such as consulting services as a product.
> So we have to come up with a data model to be able to store all the
> product information for all possible product types.

One poster suggested a single table, but I am sure that there are some attributes that are common to all items. I will suggest two tables.

The first will be your standard table:

ItemID | NameOfItem | Vendor | Auction Date | Price

The second will store all those "other" attributes, it corresponds to the single table suggestion by the other poster:

AttribID | AttributeName | Value | ItemID

You will have issues with this design. People will be more likely to add a new attribute than find an appropriate one already. You will need your app to manage this. I had this problem with phones.

SetType | Quantity | Location

Unity	|    5     |     A
unity   |    4     |     B
UnityII |    8     |     C
unity2  |   12     |     D
unity 2 |   11     |     E
unty 2  |    3     |     F


-- 
----------------------------------------------------------------------
Kyle Lahnakoski                                  Arcavia Software Ltd.
(416) 892-7784                                 http://www.arcavia.com
Received on Sat Mar 11 2000 - 00:00:00 CET

Original text of this message