title: Dynamic ENUMs in MySQL/JDBC
body: <p>I am about to design a database for a logging system.</p>
  
  <p>Many of the String columns will have a limited amount of values, but not known in advance:
  Like the name of the modules sending the messages, or the source hostnames.</p>
  
  <p>I would like to store them as MySQL Enums to save space.
  So the idea would be that the Enums grow as they encounter new values.</p>
  
  <p>I would start with a column like :</p>
  
  <pre><code>host ENUM('localhost')
  </code></pre>
  
  <p>Then, in Java, I would load on startup the enum values defined for the hostnames at a time (how do I do that with MySQL/JDBC ??), and I would alter the Enum whenever I encounter a new host.</p>
  
  <p>Do you think it is feasible / a good idea ?
  Have you ever done something like that ?</p>
  
  <p>Thanks in advance for your advice.</p>
  
  <p>Raphael</p>