Users need to be able to add a specific type of column to an otherwise static table on my web page and then save the information they enter in there to the database.
I’ve been told that in reality they will almost never go over 5 columns but I would rather support N. The columns will all be of the same datatype.
My first thought was to have an XML column with the values from all added columns in there but I was curious if anyone else had come up with a better solution. Suggestions?
if you serialize this data into one column (like using xml), you will have problems if you need to search on it.
if you don’t ever need to search on it, then xml would be fine.
you could use parent-child model:
and still have the ability to add an index and search. Your regualr data goes in the FixedTable, and any
extra columnsthe users add, goes into the VariableTable.