Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • MySQL has enums to save space (and thus improve speed), not to enforce values. For that, you should use a lookup table and a foreign key, like you would with Oracle. (Constraints are a lousy place to put a list of acceptable values because they are hard to edit from user apps.) Or you could run the database in "traditional" mode, which should make it throw an error for data that doesn't fit in an enum. Personally, I just avoid enums and use lookup tables, except for data warehouse situations where I have tight control over how the data gets into the table.