There are many developers who prefer using ENUM in MySQL, which seems to be a viable choice many times. However it’s important to take care as…
- ENUM requires a rebuild of the table when adding a value to the middle of the set.
- ENUM values are ordered in the order they’re added to the database
- ENUM values do in the database what should be done in the model.
ENUM could be useful for columns that had data that would always fit into one particular set of values. For example gender would be one such field that might be served well with an ENUM.
As Brandon says: “The bottom line is that ENUM has its place, but should be used sparingly. The model should enforce the constraints, not the database; the model should handle interpreting raw data into useful information for your views, not the database.”