Fig. 1 shows part of the relational database used by a community bicycle-repair workshop. Each record in the Repair table is linked to one customer. The com...

Assessment: Computer Science 9210 | Paper 2 Mock 01 | Concepts and principles of computer science Subject: Computer Science - 9210

Question 1 Report

Fig. 1 shows part of the relational database used by a community bicycle-repair workshop. Each record in the Repair table is linked to one customer. The computer uses CustomerID to find the correct customer name, rather than storing the name repeatedly in every repair record.

CustomerCustomerID (PK)NameRepairRepairNo (PK)CustomerID (FK)links© EAGLE BEACON GLOBAL

(a) State the name of the field that is the primary key in the Customer table. [1]
(b) State the field in the Repair table that is a foreign key. [1]
(c) Give two reasons why CustomerID is used instead of a customer name to link the tables. [2]



Fig. 1 shows a compact database diagram for a drone photography club. Members upload photographs from organised flights. The club secretary needs to keep the member record even when a photograph record is deleted from the computer.

MemberMemberID (PK)PhotoMemberID (FK)© EAGLE BEACON GLOBAL

(a) State the parent table in the relationship. [1]
(b) Give the child table in the relationship. [1]
(c) State what should happen to Photo records if a Member record is deleted to maintain referential integrity. [1]

Answer Details

Bicycle-repair database

(a) CustomerID is the primary key in Customer. [1]

(b) CustomerID is the foreign key in Repair. [1]

(c) CustomerID is used to link the tables because:

  • IDs are unique, whereas different customers may share a name;
  • an ID can remain unchanged if a customer changes their name.

Short numeric IDs using less memory or being quicker to compare is also acceptable. Any two [2].

Drone-club database

(a) Member is the parent table. [1]

(b) Photo is the child table. [1]

(c) Before a Member record is deleted, related Photo records should be deleted by cascading, or their foreign keys must be reassigned or removed. This prevents Photo records referring to a member that no longer exists. [1]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning