This is more of a design question. I have several places in models were I have records that have only a certain amount of option for them, for example:
Sex: There is only 2 options (male, female)
Level: There is only 3 options (silver, gold, platinum)
Country: There is only a limited amount of countries.
我的问题是,这种记录的正确类型是t.string还是t.integer。
当然,对于t.integer,需要有一个枚举,但在确定类型时确实会加快速度,尽管这会使代码变得更复杂,但这值得优化吗?