List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:October 4 2006 11:14am
Subject:Re: too many enum values?
View as plain text  

> how many is too many?
> i have a field with 21 possible values. each of the values are only 2 or 3
> letter strings, but that seems like a lot, would it be faster/more
> to put them in a separate table and just join?

What would you put in the separate table then? Just these 2-3 letter
strings and use the value as the PK?

You should ask yourself the following --

- do these values change depending on the customer? If so: table.

- can customers add possible values for this column? If so: table

- is there some kind of "description" for the possible values? If so: table

- is this an internally used value/code? If so: enum would be fine

- would values only be added during a database upgrade?   If so: enum would
be fine

All in my opinion, of course.

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
My thoughts:
Database development questions? Check the forum!

too many enum values?Tanner Postert4 Oct
  • Re: too many enum values?joao4 Oct
  • Re: too many enum values?Martijn Tonies4 Oct