I have several columns that need to store only a few values ββ(e.g. 0, 1, 2, 3). What type of data should be chosen for this case? It seems to me that I should choose something like ENUM ('0', '1', '2'). Would it be better (although it would be less restrictive)? Should I consider something else (e.g. tinyint)?
EDIT:
Actually, what general advice should be considered when choosing a data type?
If you want to limit this to these 3 values, then really ENUM may be the best.
If, however, it is likely that more values ββmay be required in the future, then TINYINT UNSIGNED is probably the best solution.
It is recommended that you use a fixed-set enumeration. If you want to extend, then this βChangeβ is basically a change to the scheme that should be avoided.
Find a better understanding of data type selection
and get an enumeration comparison with data types