Page 1 of 1

product management

Posted: Fri Jun 12, 2009 12:49 pm
by atonalpanic
Hello,

I'm designing the database and code for a eCommerce-like system. Inventory items have attributes
that should be assigned to them in the order_members table (the table that relates inventory to actual orders).
Now, each item may have different attributes. For example,

Gift Cards have a serial number attribute that is typed in a textbox.
Shirts have a size attribute that is selected from a drop-down box.
Some items have a gender attribute that is selected from a drop-down box.
Others have no attributes.

Also, due to the fact that only one order can be placed per user (think fundraiser contest),
some items have actions:

Gift Cards need an action to be split into smaller denominations (because prizes come in packages, not individually).

I'm trying to figure out a database design that would allow for dynamic situations like this because events change
and so do prize packages so that I don't have to spend all my time maintaining code that was written for a specific
event.

What I'm thinking I have to do is dynamically create new tables for relationships between (for example) an item's possible size attributes table and the order_members table.

Would it be better to use XML?