ive asked this question a half a dozen different ways and none have
ever gotten an answer.
(Just an aside--is everybody switching to top posting--where's the
context, what's the question--must I read the rest of the post to find
the question? (Sorry, I'm in a funky mood, on another list I read,
some guy quoted a long post, and somewhere in the middle of it posted a
short phrase response (less than a line). What a pain.)
Anyway, after skimming the rest of the post, I'm not entirely sure of
* do you want pointers on how to search for "sparse tables" on
* do you want help on storing "variable column sparse tables"--ahh, I
didn't see the variable column part the first time I skimmed
Anyway, before I saw that, I was going to say that a relational data
base (which is what Rails uses (iiuc, something like MySQL, Postgresql
(??), or whatever, is something like a sparse table because tables
don't have to be "complete"--for example, if the key field is some
numerical index, you can have records 001, 006, and 046--you don't have
to have a line for every record from 001 thru 046.
But I guess that's not what you mean by "variable column sparse tables".
So what do you mean? You mean where (starting with my sparse example
above ;-), some records (lines) do not have a value for every column?
Maybe something like this:
View in fixed font:
key lastname firstname height weight hatsize shoesize
001 Mattia Frank 5'11" 7 1/4 10
006 Doe John 5'6" 165
046 Jane 5'5"
If that's what you're looking for, as far as I know, tables like this
can exist in a relational data base and not really cause any problem.
A pedant would (I think) make some comment about the data not being
fully normalized, and maybe some slightly less efficiency that would be
experienced if you had many (i.e., thousands, millions) of such
OTOH, normalizing the database (typically) takes effort both by the
programmer / database administrator and in the database itself (running
queries or whatever to actually accomplish the normalization, so for
small quantities of data (I would argue that) it is not efficient to
normalize the data.
> afaik i need a table for my rows
> a table for my columns
> a table for cells.
> and a table of "tables"
I haven't thought through what the above is about, but at a quick skim
it sounds like the kind of tables and effort that would be needed to
normalize the database. Like I said, for some definitions of small,
this is counterproductive for small quantities of data (imho).
If your question is something else, maybe you can clarify.