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.
(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.
(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]
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:
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]
Everything you need to excel in your exams