When should I use enumerations stored in the database and when an enum in the code?
<p>What is the best way to store enumerations? 
For example, I have an entity Person that has a property Sex. The first option that I can think of is a table that stores the enumeration values and names (1 is for Male and 2 is for Female for example) and then in the Person table to store the int values. The second option is to have an enumeration in the code with a corresponding int values and store in the Person table the int values. The last option is to have again enumeration in the code and store the string value. For example, Person with sex 'Male'. </p>

<p>Which approach is better and when? </p>
