On 11/28/05, Martijn Tonies <m.tonies@stripped> wrote:
> > Part of me agrees with you, on a "Pure SQL level". but then why would
> > anyone ever use ENUM or SET?
> I wouldn't :-)
> IMO, they're abominations that are to be avoided.
Again, part of me agrees with you. But part of me, particularly the
part that says "our queries need to be optimized as much as possible,
so our customers will be happy," thinks that ENUM and SET are
non-standard, MySQL specific ways to create normalized data without
having an extra table, and thus an extra join, and thus more
computation, and thus a slower query.
Tell me, do you also create your own sequences in MySQL instead of
using the AUTO_INCREMENT feature? Because that, too, is an
abomination in the same way.
I use ENUM a lot, successfully, and when I want to add another ENUM
value to a table (I never delete one), I have a script that runs a
show table, gets the ENUM field in question, gets all the values, and
alters the table modifying the column with the correct values (all the
current values + the new one). I've never had a problem with it yet