title: Database normalization - foreign keys
body: <p>I'm trying to understand database normalization, I understand the general idea, but what is the right approach and what would be excess.</p>
  
  <p>So for example I have a standard employee-department database as the first step.</p>
  
  <p>Tables are</p>
  
  <pre><code>EMPLOYEES:
  id, first_name, last_name, dob, email, city, address, department_name
  </code></pre>
  
  <p>So, to normalize this as the first step I would move department name to a separate table and would join when necessary as many-to-one.</p>
  
  <pre><code>EMPLOYEES:
  id, first_name, last_name, dob, email, city, address, department_id
  DEPARTMENTS
  id, name
  </code></pre>
  
  <p>Would this be enough for normalization or is it better to move all other fields but <code>department_id</code> to a second table like <code>employees_meta</code>? Imagine if we have 20 more fields in the table describing the employee, what then would be normal? </p>
  
  <p>If we are talking about optimizing a webpage, would the right normalization be to have only the fields we always show when we work with employee table, and all other information we don't use so frequently to be moved to different tables?</p>