• This is a great discussion. I share similar views as JRoughgarden. But I wonder even on a small number of values that

    never change how do you achieve clarity when using CHECK constraint. Let's use JRoughgarden sex column with check constraint - two values 'M' and 'F' are allowed and its pretty clear what sex is a person when someone looks at the row from this table. But then comes Joe Celko with his sex column: the ISO sex codes are {0= unknown, 1= male, 2= female, 9= lawful persons}. I think he always uses CHECK constraint and not a lookup table for this case. On the front end you can use enumeration with description (i.e. front end written in java) to get what sex is someone. But if I go to the database and see values 0,1,2,9 in a row I think I will not know what they mean - how do you achieve clarity for cases like this? Do you say go see ISO sex codes on google or open front end application and search the enumeration to find code descriptions??

    regards