Question bank › A-level Computer Science › Fundamentals of databases

Data modelling, relational databases and normalisation

Answer on paper first, then reveal the mark scheme one mark at a time.

1Core4 marks

A school database has two tables:

Student(StudentID, Name, FormID)
Form(FormID, Tutor)

(a) State the foreign key in the Student table. [1]

(b) Explain the purpose of a foreign key. [1]

(c) State the type of relationship between Form and Student. [1]

(d) Explain why Tutor is stored in Form rather than in Student. [1]

2Hard5 marks

A table in first normal form is: Orders(OrderID, ProductID, OrderDate, CustomerID, CustomerName, CustomerCity, ProductName, UnitPrice, Quantity).

The primary key is (OrderID, ProductID). The dependencies are:
OrderID → OrderDate, CustomerID
CustomerID → CustomerName, CustomerCity
ProductID → ProductName, UnitPrice
(OrderID, ProductID) → Quantity

(a) Explain why the table is not in second normal form. [1]

(b) Give a set of tables in third normal form. Write each table as TableName(attribute, attribute, …) and write (PK) after every attribute that is part of that table’s primary key. [4]

3Standard3 marks

The entity-relationship diagram shows part of a shop's database. A crow's foot at the end of a line shows the ‘many’ side of a relationship.

(a) Identify the relationship that is many-to-many. [1]

(b) Explain how this relationship is implemented in a relational database. [2]

CustomerOrderProduct

Stuck on this topic?

Book a free 30-minute session on WhatsApp and we'll find exactly which step is costing you the marks. Or build a timed paper on it.

Free 30-minute session