Database Design: A proper table design for large number of column values.
- by Jake
I wish to perform an experiment many different times. After every trial, I am left with a "large" set of output statistics -- let's say, 1000. I would like to store the outputs of my experiments in a table, but what's the best way...?
Option 1
Have a table with 1000 columns. Seems like a bad idea. What if the number of statistics one day exceeds the maximum number of columns?
Option 2
Have a table with three columns. Let's say, ID, StatisticType, and StatisticValue. That way, you can have as many statistics as you want. However, reading a single experiments statistics becomes more complicated. Moreover, what if different statistics are different data types??
Any suggestions?