Database Questions
Database Questions
📊 0. Data vs Information
Term Definition Example
Data Raw facts or values without context. 95, "Jason", 12/06/2025
Processed data given context and "Jason got 95/100 on the final
Information exam"
meaning.
🔗 3. Relationships in Databases
Type Description Example
1:1 One record ↔ one record One user ↔ One passport
1:N One record → many records One customer → many orders
M:N Many ↔ many Students ↔ Courses (via linking table)
🧾 4. Referential Integrity
• Enforces logical links between related tables.
• Foreign keys must match primary keys in the referenced table.
• Prevents “orphan” records and data inconsistencies.
• Ensured via constraints and foreign key rules in the DBMS.
• Entity = Table
• Attribute = Field (column)
• Primary Key (PK) = Unique identifier
• Foreign Key (FK) = References another table
• Relationship = Line connecting two entities
• Cardinality = Specifies how many matches exist
Example:
• Student(StudentID, Name)
• Course(CourseID, Title)
• Enrollment(StudentID, CourseID) ← junction table
🔢 6. Cardinality in ERDs
Type Description ERD Notation (Crow’s Foot)
1:1 One to one
1:N One to many
M:N Many to many >—<
Queries:
SELECT * FROM Students;
SELECT Name FROM Students WHERE Age > 16;
SELECT COUNT(*) FROM Students;
Join:
SELECT Students.Name, Courses.Title
FROM Students
JOIN Enrollments ON Students.ID = Enrollments.StudentID
JOIN Courses ON Enrollments.CourseID = Courses.ID;
🧠 9. Key Vocabulary
Term Meaning
Primary Key Unique field per record
Foreign Key Field that references a primary key
Composite Key Multiple fields acting as a PK
Schema Database structure definition
Data Dictionary Metadata repository
ACID Atomicity, Consistency, Isolation, Durability
DBMS Software managing databases
Concurrency Safe multi-user data access
Data Integrity Accurate, valid data
Transaction Executed as a single logical unit
–2– 8820 – 7015
Option A — Databases
1. The Driving Licensing Agency stores information about individuals who hold a driving license
and/or own vehicles.
(a) Construct the entity-relationship diagram (ERD) that shows the relationship between
the individual, their driving license, and their vehicle(s). [2]
When an individual applies for a driving license, they have to complete a license application form.
The following is an extract from that form:
Surname
First name(s)
Mr Mrs Miss Ms
(b) Explain why Date of birth has been separated into three fields. [3]
The data in the form shown above is stored in the Person table. The license application form
also requires an individual’s medical information. This is stored in a table called PersonMedical.
The following extract is a sample of the medical questions that are asked.
Figure 2: A sample of the medical questions asked on the license application form
If you have answered “Yes”, please tick all the appropriates boxes.
Epilepsy
Fits or blackouts
Repeated attacks of sudden disabling giddiness
Diabetes controlled by insulin
(c) Explain two reasons why medical information should not be stored in the Person table. [6]
(e) Outline two situations where data stored by the Driving Licensing Agency may need to
be open to interrogation by other parties. [4]
2. Billetmania is an online company that sells tickets for theatre performances and music concerts.
After a customer has chosen their seats, they can pay for the tickets through a secure online
payment system. Once the transaction has been completed, the customer receives an
email receipt.
An information system and a database are used for Billetmania’s day-to-day operations.
(b) Outline how the Billetmania information system would utilize a database. [2]
(c) Explain the importance of transaction durability to Billetmania when clients book tickets. [3]
(d) Explain how the Billetmania database management system ensures that a seat is not
booked by two people simultaneously. [4]
Turn over
–4– 8820 – 7015
(Option A continued)
3. WineForAll is a retailer that sells wine in its stores. Each store sells wine from a number
of vineyards.
The following extract from the Wine file contains unnormalized data.
2015, Dry,
Chardonnay Stormy Bay $19.99 Gisborne 1 45
13 %
2016, Brut,
Pelorus Stormy Bay $34.99 Gisborne 1 10
14 %
2013, Fruity,
Shiraz James Tree $25.99 Hawkes Bay 3 15
13.5 %
2013, Fruity,
Shiraz James Tree $25.99 Hawkes Bay 2 40
13.5 %
2014, Fruity,
Merlot James Tree $29.99 Hawkes Bay 1 25
14 %
2017, Dry,
Chardonnay John Glad $15.99 Gladstone 2 28
13.5 %
(b) Identify the steps to create a query to find the vineyards and names of fruity wines
where the quantity in stock is between 25 and 35 bottles. [3]
(c) (i) Identify the steps to create a non-persistent derived field called TotalPrice,
which would hold the total value of wine stored for each record. [2]
(ii) Outline why the inclusion of a derived field will not affect the normalization of
a database. [2]
(d) Construct the 3rd Normal Form (3NF) of the unnormalized Wine file. [6]
(e) Outline why a single-field primary key is not always an appropriate solution for
normalized databases. [2]
End of Option A
Turn over