Is it always good to join tables rather than implementing the
information straight to the table?
For instance, a user table would have a privileges field that sets to
either ‘regular’,‘moderator’ or ‘admin’. Another field would list the
user activity. Activities could change over time and list quite a few
different entries
(‘student’,‘unemployed’,‘computers’,‘tourism’,‘sales’…)
I see the interest of having a foreign key referencing a separate table
for activity, but for privileges, i am unsure of the benefits of such a
approach.
I haven’t seen anything that lets you set an enum type for mysql in
rails.
Maybe would this be the right place to use the predefined “Type” field??