title: How to emulate "extending a class" with database tables?
body: <p>I will have several different types of users that will use my system. For all users I need to store such things as username, password, email address, etc, but if they are a user of category A, I also need to store values for fields a, b, and c, but if they are a user of category B, I need to store values for fields d, e, f, and g.</p>
  
  <pre><code>USER
  -------
  id
  username
  password
  
  CAT_A
  --------
  id
  a
  b
  c
  
  CAT_B
  --------
  id
  d
  e
  f
  g
  </code></pre>
  
  <p>I most likely need to use a bridge table of some sort to link a user to one of the CAT tables, but how do I go about doing that? I can't use something like this:</p>
  
  <pre><code>EXTEND
  --------
  user_id
  cat_id
  </code></pre>
  
  <p>Because I wouldn't know which CAT table the cat_id refers to. Would I need a field for each of the categories? If so, that doesn't seem normalized since there would be a lot of empty fields, especially if I have 3 categories.</p>
  
  <pre><code>EXTEND
  --------
  user_id
  cat_a_id
  cat_b_id
  ...
  </code></pre>
  
  <p>Any input is much appreciated!</p>