title: Foreign key to match the Primary key?
body: <p>I have to make appropriate links using the foreign key to match the primary key. </p>
  
  <p>What would be the correct foreign keys?</p>
  
  <pre><code>Student(sid integer, sname varchar(20), programme varchar(4), level integer, age integer) 
  
  Class(ccode varchar(6), cname varchar(25), week_day varchar(3), meets_at time, room varchar(6), tid integer) 
  
  Enrolled(sid integer, ccode varchar(6)) 
  
  Tutor(tid integer, tname varchar(20)) 
  </code></pre>
  
  <p>The meaning of the tables above is obvious: Student stores data about students registered in some 
  programme offered by Computing department. Each class identified by the ccode (which is the its 
  code) is taught by a tutor identified by tid. Enrolled has one row per each pair student-class, for 
  each student registration in a given class. Tutor stores data about the tutors involved in teaching. 
  Note that all the names of students and tutors consist in a string formed of the last name preceded 
  by a first (and possibly a middle) name. The primary keys are underlined. </p>