9618/12/O/N/22 question 5: worked solution (October/November 2022, paper 12)

Show as plain text

Cambridge AS Level Computer Science 9618 · 8.1 Database Concepts Worked solution from the Databases Paper 1 Theory Fundamentals booklet, Part 1 of 2. Q5 9618/12/O/N/22 original Q5 Structured · 11 marks Worked solution (a) The problem is a many-to-many link between OWNER and TREE. Fix it with a linking table. Any three points: Remove the many-to-many relationship between OWNER and TREE. [1] Remove TreeID and TreePosition from OWNER. [1] Create a linking table that holds OwnerID, TreeID and TreePosition. [1] Its primary key is OwnerID and TreeID together (or add a new named key). Another accepted answer: move TreePosition and OwnerID into TREE, and make a new table for the tree species (ScientificName, MaxHeight, FastGrowing) with its own primary key. (b) INSERT INTO TREE VALUES ('LOW_1276', 'Salix_Alba', 30.00, TRUE); INSERT INTO TREE [1] VALUES ( ) with the correct values [1] Values in the correct order [1] Naming the fields after the table name is also accepted. (c) A candidate key is a field (or set of fields) that could be used as the primary key. [1] (d)(i) A data dictionary stores metadata about the database. [1] Example: field names (or table names, data types, validation rules, keys, relationships). [1] (d)(ii) A logical schema is an overview of the structure of the database. [1] It models the problem by using methods such as an E-R diagram. [1] It is independent of any particular DBMS. KEY IDEA Remove a many-to-many link by adding a linking table that holds the keys of both tables. TOTAL 11 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by Audere Prep. Tap the picture to open it on YouTube.