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

Higher Computing Science 2017 Question 4 (CfE)

2 marks · Database features

Tables within a database can make use of compound keys and surrogate keys. Explain the difference between a compound key and a surrogate key.

Marking scheme

A compound key is a key field made up of two or more fields (that are primary keys in other tables/foreign keys) A surrogate key is created to introduce a primary key (in the absence of a natural primary key) Automatic generation of surrogate key on its own is not sufficient for a mark Allow two fields for compound key if linked to transition table/ associate entity

Previous question: Higher Computing Science 2017 Question 3 (CfE)

Next question: Higher Computing Science 2017 Question 5 (CfE)