I am starting to think about writing an RoR app to store some 2-D
data. Most of the data are textual, although there could be a column
of dates or a column of numbers here and there. The issue is:
different data sets have different columns.
Currently, the data are stored in spreadsheets. Many of the sheets
share a common set of columns, but there are some differences (and
more differences could be added later -- after all, they are just
spreadsheets, and I can change the heading at the top of a column and
start filling in data for that column at will.)
Is this a common problem? If so, how have folks solved it?
One solution might be to say, "You are an agile RoR developer (ok,
it's a bit of a stretch, but for the purpose of this argument, let's
pretend it's true), adding a column to a database is just as easy as
adding a column to a spreadsheet. Design the application with the
columns you know about today. Add more columns tomorrow when you
discover/decide you need them."
Another solution might be to create a table of headings for each
column and create a table with just text values associated with each
type of heading (and associated with the other table(s) to which the
data belongs). Do the same thing for the numeric data and the date
data. Design the application so it's easy to add columns via the UI.
Another solution might be to do something completely different. Any