title: Storing enum values in database
body: <p><em>FYI: I explicitly mean SQL Server 2000-8 and C#. So DBMSs with enum support like MySql is not the subject of my question.</em></p>
  
  <p>I know this question has been asked multiple times in SO. But still, I see in answers that different approaches are taken to store enum values in db.  </p>
  
  <ol>
  <li><p><em><strong>Save enum as int in db and extract the enum value (or enum description attribute using reflection) in code</em></strong>:<br>
  this is the approach I usually use. The problem is when I try to query from database in SSMS, the retrieved data  is hard to understand.</p></li>
  <li><p><em><strong>Save enum as string (varchar) in db and cast back to int in code.</em></strong><br>
  Actually, this might the best solution. But (don't laugh!) it doesn't feel right. I'm not sure about the cons. (Except more space in db which is usually acceptable) So anything else against this approach?</p></li>
  <li><p><em><strong>Have a separate table in db which is synchronized with code's enum definition and make a foreign key relationship between your main table and the enum table.</em></strong><br>
  The problem is when another enum value should be added later, Both code and db need to get updated. Also, there might be typos which can be a pain!  </p></li>
  </ol>
  
  <p>So <em>in general</em> when we can accept the overhead on db in 2nd solution, What would be the best way to store enum values in db? Is there a general definite design pattern rule about this?<br>
  Thanks.</p>