title: Should I Populate Country/Region Names at DB or Application Level?
body: <p>I'm going through a tough decision (at least for me)...</p>
  
  <p>My website would have a list of countries in dropdown list and list of cities based on chosen country. I decided to populate the list at db level as:</p>
  
  <pre><code>CREATE TABLE Country
  (
      countryID - PK
      countryName - FK
  );
  
  
  CREATE TABLE City
  (
      cityID   - PK
      countryID - FK
      cityName
  );
  
  CREATE TABLE Register
  (
      registerID - PK
      cityID - FK
  
  )
  </code></pre>
  
  <p>However, this can add some complexity in php back-end coding when inserting record into registration as well as retrieving record from countries/cities, because on registration form user will city name on droplist, user won't see cityID, so i will have to fetch cityID based on chosen cityName, etc. Therefore, i said why do i just put the countries and cities list at application level in fixed drop down list and make register table look as:</p>
  
  <pre><code>CREATE TABLE Register
  (
      registerID - PK
      cityName
  )
  </code></pre>
  
  <p>cityName gets inserted directly without us having to join or call multiple tables and get specific ID for a city so we can then grab the cityName, etc...</p>
  
  <p>I will only normalize in crucial tables such as making relationships between Member and Post/Thread tables. A member can have multiple threads one-to-many relationship. Otherwise, things that relate to multi-value as countries list won't be considered at DB level for simplicity and rap sake.</p>
  
  <p>What do you think? Advice ...</p>