List:General Discussion« Previous MessageNext Message »
From:Perrin Harkins Date:July 31 2008 3:24pm
Subject:Re: SET vs. ENUM
View as plain text  
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
constraint.

- Perrin
Thread
SET vs. ENUMJerry Schwartz31 Jul
  • Re: SET vs. ENUMMartijn Tonies31 Jul
    • RE: SET vs. ENUMJerry Schwartz31 Jul
  • Re: SET vs. ENUMMartijn Tonies31 Jul
    • RE: SET vs. ENUMJerry Schwartz31 Jul
      • Re: SET vs. ENUMChris W31 Jul
        • Re: SET vs. ENUMMr. Shawn H. Corey31 Jul
          • Re: SET vs. ENUMChris W31 Jul
  • Re: SET vs. ENUMPerrin Harkins31 Jul
    • Re: SET vs. ENUMMr. Shawn H. Corey31 Jul
      • Re: SET vs. ENUMPerrin Harkins31 Jul
    • RE: SET vs. ENUMJerry Schwartz31 Jul
  • Re: SET vs. ENUMMartijn Tonies1 Aug