Worked solution from the Databases Paper 1 Theory Fundamentals booklet, Part 1 of 2.
Give two ways, each with the reason (any two):
Reduces data redundancy [1]
...because linked tables mean each data item is stored only once [1]
Reduces data inconsistency (improves integrity) [1]
...because data stored once only needs updating once, so linked data cannot differ between tables [1]
Other accepted: program-data independence (data is separate from the software), complex queries are easier, different views for different users.
Complete the table:
| Term | Description |
|---|---|
| Entity | An object that data is stored about. |
| Tuple | A row of data in a table about one instance of an object. |
| Secondary key | An additional key used as well as the primary key to find data (a candidate key not chosen as primary key). |
| Foreign key | A field in one table that is linked to a primary key in another table. |
Entity [1]
Tuple description [1]
Secondary key description [1]
Foreign key [1]
Split into three tables: car details depend on the registration, customer details on the customer, and the booking links them. A CustomerID is a better key than a first name. In the written answer, underline the primary keys: BookingID, CarRegistration and CustomerID.
BOOKING(BookingID, CarRegistration, CustomerID, StartDate, EndDate) CAR(CarRegistration, CarModel, CarColour) CUSTOMER(CustomerID, CustomerFirstName, CustomerLastName, EmailAddress, TelephoneNumber)
Three tables with suitable identifiers [1]
Suitable primary key underlined in each table [1]
BOOKING holds the primary keys of CAR and CUSTOMER as foreign keys [1]
All original fields are in the correct tables [1]
Write two checks (any two):
Length check: the registration must be 6 characters [1]
Format check: letter, digit, digit, digit, letter, letter [1]
A type check (alphanumeric) is also accepted.
Write two verification methods:
Visual check: compare the number typed with the source document [1]
Double entry: type it twice and the computer compares the two entries [1]
Write: the number may be in the correct format and match the document, but be the wrong registration for that car (the source itself may be wrong). [1]
▶ Starts at Q4 (45:30)
Starts at Q4 (45:30) · by Pseudocode Pro. 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.