title: RDBMS keys confusion
body: <p>I have some confuse about candidate key, primary key, mininal superkey.</p>
  
  <p>By definition:</p>
  
  <p><strong>Primary key</strong>: only 1 attribute , so it must be minimal superkey and it's also a candidate key(because its minial superkey)</p>
  
  <p>First conclusion: If a key is primary key, then it also a candidate key and a minimal superkey</p>
  
  <p>The following point I think it's true, but I am not sure. Can someone confirm with me together?</p>
  
  <ol>
  <li><p>If it's minimal superkey, it doesn't mean it's a primary key. But it means it's candidate key. </p></li>
  <li><p>If it's candidate key, it doesn't neccessarily to be mininal key, also it doesn't need to be 
  primary key.</p></li>
  </ol>
  
  <p>Conclusion:</p>
  
  <ol>
  <li><p><strong>primary key</strong>: only 1 value, can identify whole row. It also candidate key and minimal</p></li>
  <li><p><strong>minimal superkey</strong>: 1 value or combination of fields can identify whole rows, so it's a candidate key but not necessary primary. But if takes out any one field, then it's no longer a key</p></li>
  <li><p><strong>Candidate key</strong>: 1 value or combination of fields can identify whole rows but don't have to be minimal or primary.</p></li>
  </ol>