title: Primary Key and ER models
body: <p>Say i have an ER model</p>
  
  <pre><code> _____________
  |     E2      |
  |_____________|
    |    |    |
    |    |    |
   A21* A22  A23*
  </code></pre>
  
  <p>where the A21 and A23 are primary keys.</p>
  
  <p>Would this mean the primary key for E2 will be</p>
  
  <p>PRIMARY KEY(A21, A23)?</p>
  
  <p>If so, then what is the difference of the diagram below.</p>
  
  <pre><code> _____________
  |  E2         |
  |_____________|
    |    |    |
    |    |    |
    []---|----[]---[]
    |    |    |
    |    |    |
   A21* A22  A23*
  </code></pre>
  
  <p>where the [] are representation of a combination of primary keys.
  is this the same as the previous diagram and the primary key being
  PRIMARY KEY (A21, A23)?</p>
  
  <p>Then, based on the first diagram, should there be SQL code, can the statement
  REFERENCES E2(A21) and REFERENCES E2(A23) exist?
  Or do we have to always reference all the primary keys in a table?</p>
  
  <p>I hope my question is clear enough.</p>