Tuesday, November 11, 2008

Sample database schema for a catalog with complex products and options

The following schema shows a sample way of dealing with complex products that have multiple options (color, custom text, etc).

Notice the Type column in the ProductOptions table. It is used by the UI to render the appropriate control for the option. It could contain any of the following or more:

  • 0 (DropDownList)
  • 1 (CheckBox)
  • 2 (TextBox)
  • 3 (Date)

1

 

And the way the information is stored after the order is placed

 

2

3 comments:

Bruce Coad said...

Nice solution, thanks.

Anonymous said...

Thanks! Your schema was very helpful.

Unknown said...

Panic causes tunnel vision. Calm acceptance of danger allows us to more easily assess the situation and see the options. See the link below for more info.


#options
www.ufgop.org