As a DBA I always hate when people are using columns as flags, it would be a lot of extra columns.
If it is all the same type (like account type), I would do as the first anwer suggests (including using text, not numbers).
If you on the other hand needs it for separate flags or multiple types (but having a restricted number) I would actually go for a binary calculation.
That is, have one columns in the table representing all the flags and then assign each flag a number.
ex.
FLAGS = {:master => 1, :standard => 2, :guest => 4, :power => 8,
:another_flag => 32, :yet_another_flag => 64}
def is_master?
self.flags & FLAGS[:master]
end
def is_standard?
self.flags & FLAGS[:standard]
end
It requires a bit more work when setting the values, but doesn't clutter up the table with a lot of columns used only for flags.