I am settting up a database in which we want to store information about products and their attributes.

However, we do not know in advance what attributes will be part of the product, apart from a few (price, date-available etc). So I came up with the idea to use a separate table for producttype-attributes, that would be filled afterwards.

The producttype-attributes would then be defined for a product-type.

EG: a product-type of car would have product-attributes:
Powerchain (electric/diesel/hybrid/petros/steam)
Airco (Yes/No)
NoOfDoors (anInteger)
PriceInEuro's (currency)
PriceInDollars (currency)

If an extra attribute would show up, for example the amount of CO2 exhaust per km, then one would add a producttype-attribute

CO2exhaustpkm (float) ,

add that to the product-type, and every car would get that extra attribute.

These attributes would of course be defined in a separate table, that would make it possible to use those producttype-attributes for different product-types. In our case the Powerchain attribute would also be part of the product-type for trains, planes and vans.

The scheme would be:

producttype-attributes <<->> product-type ->> product<->>product- attributes -> producttype-attributes

The problem for me is in the values that a producttype-attribute can have. It would mean that one defines in producttype-attributes values like boolean/date/time/integer/float/multiplechoice on a meta level and that value that would end up in the product-attributes. That would have to translate into a view (popup list, numberformatter, dateformatter) during input and presentation.

Is there anybody that has done that kind of thing, or does anybody know any examples that do the same thing?


Regards,

Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6273852


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to