title: ER inheritance modeling
body: <p>A supply farm can have a transportation document. If present it can be one of two types: internal or external. Both documents share some common data, but have different specialized fields. </p>
  
  <p>I though of modeling this in a OO-ish fashion like this:
  <a href="http://www.arsmaior.com/tmp/mod1.png" rel="nofollow noreferrer">alt text http://www.arsmaior.com/tmp/mod1.png</a></p>
  
  <p>In the document table, one of the two doc_*_id is null, the other is the foreign key with the corresponding table. </p>
  
  <p>That is opposed to the other schema where the common data is redundant:
  <a href="http://www.arsmaior.com/tmp/mod2.png" rel="nofollow noreferrer">alt text http://www.arsmaior.com/tmp/mod2.png</a></p>
  
  <p>I'm trying to discover pros&amp;cons of both approaches.</p>
  
  <p>How do I SELECT to know all the internal docs in both cases? We have a sort of mutually exclusive foreign keys, the JOINs are not so trivial. </p>
  
  <p>Is the first approach completely junky? </p>