Hey Everyone.
Just wondering what I should do in regard to how much data (what type of data) to store in the db.
If I have a table of cars:
--cars-- id - PK type color
Hey Everyone.
Just wondering what I should do in regard to how much data (what type of data) to store in the db.
If I have a table of cars:
--cars-- id - PK type color
For admins and users, I would keep them both in the same table with a role field to differentiate them. It really depends on your security requirement and if admins and users login using the same authentication mechanism. A role table for lookup is required.
For colors, MYSQL allows an ENUM type for a field. But it isn't directly supported by Rails.
might help if you are using MYSQL and want to modify Rails to support it. For your particular case, you need to take a call based on data volume and the attributes you want to segregate. Maybe a cars table and a car_attributes table with something more than just a color in there.