So, yesterday, just one day after writing a short article about ENUM and SET and having it pointed out to me that data does not have a place in data structures (which is absolutely correct!), what did a developer want me to do at work but change an existing ENUM to add one item?
Well, having learned a bit, I suggested an alternative. The performance of our site depends on using ENUMs in the way I described, so we must continue to use them. Additionally, I was listening to Robin Schumacher making comments about how some folks “over-normalize” their data and need to do too many JOINs as a result.
Technically speaking, it’s not possible to “over-normalize” a data structure. But I’ll let that slide, because I know exactly what he meant.
At any rate, the alternative I suggested was to add all possible data points, not just the one, to the ENUM, thereby saving future ALTER TABLEs.
So a thank you to Kolbe, Beat and Arjen. I also would like to let people know that I am not perfect, and will attempt to understand mistakes I’ve made gracefully. I’m not perfect, that’s for sure, so do feel free to point out where I’m not correct.