Worked solution from the Databases Paper 1 Theory Fundamentals booklet, Part 2 of 2.
Write one answer for each item:
| Item | Answer |
|---|---|
| Primary key in COMPANY | CompanyID |
| Candidate key in TELESCOPE | SerialNumber (TelescopeID also accepted) |
| Degree of relationship TELESCOPE to PHOTOGRAPH | 1:M (one to many) |
Suitable primary key: CompanyID [1]
Candidate key: SerialNumber or TelescopeID [1]
Degree: 1:M (one telescope takes many photographs) [1]
This is the part of the DBMS that describes how the data is organised, not the data itself.
Write: logical schema [1]
Count the TelescopeID values, only for companies whose ID starts with HW. LIKE with % matches any ending.
SELECT COUNT(TelescopeID) FROM TELESCOPE WHERE CompanyID LIKE 'HW%';
COUNT used to total the telescopes [1]
TelescopeID inside the brackets [1]
CompanyID after WHERE [1]
'HW%' after LIKE [1]
Use ALTER TABLE to add a new field. The resolution looks like 1920 × 1068, so store it as text.
ALTER TABLE PHOTOGRAPH ADD Resolution TEXT;
ALTER TABLE PHOTOGRAPH [1]
ADD Resolution with a text type, for example TEXT or VARCHAR(11) [1]
Fill in the two gaps:
The bit depth of a bitmap image is the number of bits used to store each pixel. [1]
Metadata is stored in the header of the file. [1]
A query processor takes the request from the user and finds the answer in the database.
Allows the user to enter criteria for the search [1]
Searches for the data that meets the criteria and organises the results to show to the user [1]
Either of these two points about searching or organising the results can earn the second mark.
▶ Topic lesson
A lesson on this topic · by Craig'n'Dave. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.