ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions

Higher Computing Science 2024 Question 12

2 marks · Keys and the data dictionary

An e‑sports club runs weekly tournaments. The club uses three linked tables in a relational database to store details of players, tournaments and scores as shown below. Player Tournament Score playerID forename surname email tournamentID title date playerID* tournamentID* score The following SQL statement has been written to add a new score to the Score table. INSERT INTO Score(playerID,score) VALUES("P1815", 550); The tournamentID field is missing from the SQL statement. Explain why this causes the SQL statement to fail.

Marking scheme

• tournamentID is part of the compound/primary key • A primary key cannot be blank/null

Previous question: Higher Computing Science 2024 Question 11

Next question: Higher Computing Science 2024 Question 13