title: Type to use for "Status" columns in a sql table
body: <p>I have a (dummy) table structure as follows:</p>
  
  <pre>
  ticket
    <b>id</b>: int(11) PK
    <b>name</b>: varchar(255)
    <b>status</b>: ?????????
  </pre>
  
  <p>The question is, what data type should I use for status? Here are my options, as I see them:</p>
  
  <ol>
  <li> varchar representing the status - BAD because there's no integrity</li>
  <li> enum representing the status - BAD because to change the value, I'd have to alter the table, and then any code with dropdowns for the values, etc etc etc</li>
  <li> int FK to a status table - GOOD because it's dynamic, BAD because it's harder to inspect by sight (which may be useful)</li>
  <li> varchar FK to a status table - GOOD because it's dynamic, and visible on inspection. BAD because the keys are meaningful, which is generally frowned upon.  Interestingly, in this case it's entirely possible for the status table to have just 1 column, making it a glorified enum</li>
  </ol>
  
  <p>Have I got an accurate read of the situation? Is having a meaningful key really that bad? Because while it does give me goosebumps, I don't have any reason for it doing so...</p>
  
  <p><strong>Update:</strong>
  For option 4, the proposed structure would be <strong>status</strong>: <em>char(4) FK</em>, to a status table. So, </p>
  
  <p>OPEN => "Open"</p>
  
  <p>CLOS => "Closed"</p>
  
  <p>"PEND" => "Pending Authorization"</p>
  
  <p>"PROG" => "In Progress</p>
  
  <p>What's the disadvantage in this case ? The only benefit I can see of using int over char in this case is slight performance.</p>