title: Foreign Keys vs. Partial Keys and their E-R representations
body: <p>I'm having trouble understanding the difference between partial keys/weak entities and foreign keys.  I feel like an idiot for not being able to understand this stuff.</p>
  
  <p>As I understand it:</p>
  
  <pre><code>Weak Entity: An entity that is dependent on another entity.
  Partial Key: Specifies a key that that is only partially unique.  Used for weak entities.
  
  vs
  
  Foreign Key: A key that is used to establish and enforce a relation between data in different tables.
  </code></pre>
  
  <p>These don't seem like they're the same thing, but I'm having trouble distinguishing their uses.  </p>
  
  <p>Take the [very] simple example: </p>
  
  <pre><code>We have employees specified by an empid.  We also have children specified by name.  A
  child is uniquely specified by name when the parent (employee) is known.
  </code></pre>
  
  <p>Would the child entity be a weak identity where the partial key is the name (partially unique)? Or should I be using a foreign key because I'm trying to establish and enforce a relation between employee and child?  I feel like I can justify both, but I also feel like I'm missing something here.  Any insight is appreciated, and I apologize for the stupid questions.</p>