On my previous countless Rails apps, I've always put each data field
as its own column in the DB, but on the last 2 projects, I've started
to create a catch-all column that is a MySQL TEXT that I serialize and
treat as a hash for a bunch of general stuff, from arrays, hashes,
This has worked well on the last 2 apps whose requirements were not
firm, so there are lots of changes on the fly.
So when there is a data field for a model that I know I'm going to
want to do a find_by..., order, or some other database operation on, I
obviously put it into its own SQL column, but otherwise, I've been
lumping everything else into that general serialized hash and setting
up methods in the model to get/set them as if they were normal
I'm curious to hear some feedback on this technique, e.g. "that bad
programming practice because..." or "it has a performance impact
because..." or "hey, me too"