I use a table GadgetData
to store the properties of gadgets in my application. There gadgets are basically sort of custom control which have 80% of the properties common like height, width, color, type etc. There are are some set of properties per gadget type that the unique to them. All of this data has to store in database. Currently I am storing only common properties. What design approach should I use to store this kind data where the columns are dynamic.
- Create table with common properties as Columns and add extra column of type Text to store the all unique properties of each gadget type in XML format.
- Create a table with all possible columns in all of the gadget types.
- Create separate table for each type of gadgets.
- Any other better way you recommend?
(Note: The number of gadget types could grow even beyond 100 and )