title: Super Foreign Key or Composite Key
body: <pre><code>ALTER TABLE `SWIMMER`
    ADD CONSTRAINT `fk5` FOREIGN KEY (`CoachID`, `Country`) REFERENCES `TEAMMEMBER` (`MemberID`, `Country`),
    ADD CONSTRAINT `fk1` FOREIGN KEY (`MemberID`, `Country`) REFERENCES `TEAMMEMBER` (`MemberID`, `Country`);
  </code></pre>
  
  <p>I'm using this SQL query and unfortunately it runs but the designer mode in phpmyadmin isn't showing up the relation between the TeamMember table and the Swimmer table which is a supertype and subtype relation in this database. Please Let me know if you can do this kind of sql query or you need to make some other connection.</p>
  
  <pre><code>ALTER TABLE `SWIMMER`
    ADD CONSTRAINT `fk5` FOREIGN KEY (`CoachID`, `Country`) REFERENCES `TEAMMEMBER` (`MemberID`, `Country`),
    ADD CONSTRAINT `fk1` FOREIGN KEY (`MemberID`, `Country`) REFERENCES `TEAMMEMBER` (`MemberID`, `Country`);
  </code></pre>