On Thu, 2008-07-31 at 11:24 -0400, Perrin Harkins wrote:
> On Thu, Jul 31, 2008 at 9:46 AM, Jerry Schwartz
> <jschwartz@stripped> wrote:
> > Other than the fact that an ENUM can have many more values than a SET, is
> > there any particular reason to choose one over the other?
> The only use for ENUM is to make your data smaller. It offers no
> protection against illegal values and can't be updated without copying
> the table. If you want to constrain values, a better approach is to
> make your tables InnoDB and use a lookup table with a foreign key
> - Perrin
I don't see how that can be; with ENUM the DB has to set aside enough
bytes for the longest identifier. The only advantage of ENUM is that
the data is in the same table; you don't have to do an extra join. It
can save you some processing time.
Just my 0.00000002 million dollars worth,
"Where there's duct tape, there's hope."
"Perl is the duct tape of the Internet."
Hassan Schroeder, Sun's first webmaster