A school database has two tables:
Student(StudentID, Name, FormID)
Form(FormID, Tutor)
(a) State the foreign key in the Student table. [1]
(b) Explain the purpose of a foreign key. [1]
(c) State the type of relationship between Form and Student. [1]
(d) Explain why Tutor is stored in Form rather than in Student. [1]
- (a) FormID(1)
- (b) It links a record in one table to a record in another table, because it is the primary key of the other table (allow: it creates the relationship between Student and Form)(1)
- (c) One-to-many (one form has many students) (allow 1:M; reject many-to-one unless the direction Student to Form is made clear)(1)
- (d) Tutor depends on FormID, not StudentID, so storing it in Student would repeat it for every student in the form (redundancy), risking inconsistent data when it is updated (allow: it would be a transitive dependency / not 3NF)(1)
- Answer: (a) FormID (b) it links a Student record to the matching Form record (it is the primary key of Form) (c) one-to-many (d) avoids storing the tutor repeatedly (redundancy/inconsistency); Tutor depends on FormID, not StudentID
- Examiner tip: A foreign key is a primary key in a different table; just "a key" earns nothing.