I need to create a good/neutral/bad field. which one would be the more understandable/correct way.
- A binary field with null (1=good, null=neutral, 0=bad)
- An int (1=good, 2=neutral, 3=bad)
- An enum (good, neutral, bad)
- Any other
It’s only and informative field and I will not need to search by this.
NULL values should be reserved for either:
neither of which is the case here.
I would simply store a
CHARvalue myself, one of the set{'G','N','B'}. That’s probably the easiest solution and takes up little space while still providing mnemonic value (easily converting ‘G’ to ‘Good’ for example).If you’re less concerned about space, then you could even store them as
varchar(7)or equivalent and store the actual values{'Good','Neutral','Bad'}so that no translation at all would be needed in yourselectstatements (assuming those are the actual values you will be printing).