title: Enum datatype versus table of data in MySQL?
body: <p>I have one MySQL table, <code>users</code>, with the following columns:</p>
  
  <ol>
  <li>user_id (PK)</li>
  <li>email</li>
  <li>name</li>
  <li>password</li>
  </ol>
  
  <p>To manage a roles system, <b>would there be a downside to either of the following options?</b></p>
  
  <p><b>Option 1:</b></p>
  
  <p>Create a second table called <code>roles</code> with three columns: <code>role_id</code> (Primary key), <code>name</code>, and <code>description</code>, then associate <code>users.user_id</code> with <code>roles.role_id</code> as foreign keys in a third table called <code>users_roles</code>? </p>
  
  <p>Or...</p>
  
  <p><b>Option 2:</b></p>
  
  <p>Create a second table called <code>roles</code> with two columns: <code>user_id</code> (Foreign key from <code>users.user_id</code>) and <code>role</code> (ENUM)? The ENUM datatype column would allow for a short list of allowable roles to be inserted as values.</p>
  
  <p>I've never used the ENUM datatype in MySQL before, so I'm just curious, as option 2 would mean one less table. I hope that makes sense, this is the first time I've attempted to describe MySQL tables in a forum. </p>