title: Store enum in database
body: <p>I have a database for a job advertisement web application for an assignment at university.
  I have a lot of enumeration values in database such as names of the cities, categories of the advertisement or list of languages.
  Part of the database:
  <a href="https://i.stack.imgur.com/WBMyp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WBMyp.png" alt="enter image description here"></a></p>
  
  <p>My aim was to prevent user to send via input and create some invalid data, e.g. we want the values like 'LA', "L.A." and "Los Angeles" to be represented by one ID from the <code>city</code> table.
  I also thought it is good idea to store it in database table because with given set of values, I could treat them as tags and it would improve the process of searching. Also it is easy to expand those values, e.g. add new language to list.</p>
  
  <p>Unfortunatelly professor said that this is not an optimal solution, so my question is what is the best way to store easily expandable list of enum values in situation like the above?</p>
  
  <p>I am using PostgreSQL and application will be build with Java EE running on Glassfish.</p>