0% found this document useful (0 votes)
21 views

Data Types Homework 3 Relational databases and normalisation

The document discusses the design and normalization of a relational database for a boat hire company and a Sixth Form College. It covers concepts such as composite keys, Third Normal Form properties, and the importance of normalization in reducing data redundancy and anomalies. Additionally, it addresses issues of First Normal Form violations and the restructuring of tables to achieve proper normalization.

Uploaded by

sanjarxsb
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Data Types Homework 3 Relational databases and normalisation

The document discusses the design and normalization of a relational database for a boat hire company and a Sixth Form College. It covers concepts such as composite keys, Third Normal Form properties, and the importance of normalization in reducing data redundancy and anomalies. Additionally, it addresses issues of First Normal Form violations and the restructuring of tables to achieve proper normalization.

Uploaded by

sanjarxsb
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Homework 3 Relational databases and normalisation

1. A boat hire company stores details of its customers, boats and rentals in a database. The
relations in the database hold the following data:
Boat (BoatName, type, length, berths)
Customer (CustomerID, Surname, Firstname, AddressLine1, AddressLine2, Town,
Postcode, DateOfBirth, email)
BoatHire (CustomerID, BoatName, HireDate, HireEndDate)
(a) The key in the BoatHire relation consists of three attributes.
What is the name given to a key made up of more than one attribute? [1]
Composite key

(b) The relations in this database are in Third Normal Form.


State the properties of a relation in Third Normal Form. [3]
The relation is in Second Normal Form (2NF).
There is no transitive dependency (i.e., no non-prime attribute depends on another non-
prime attribute).
Every non-prime attribute is fully functionally dependent on the primary key.

(c) State, with reasons, why it is important that relations in a database are in
Third Normal Form. [6]
Minimizes data redundancy: Ensures that no unnecessary duplication of data exists, which
reduces storage requirements.
Eliminates update anomalies: Prevents issues where updates to data in one place require
manual updates in multiple places.
Eliminates deletion anomalies: Prevents accidental loss of essential data when unrelated
data is deleted.

(d) Complete the Entity-Relationship diagram below to show the degree of the
relationships between the entities. [3]

1
Boat

BoatHire Customer

2. A database is to be created to hold data about students at a Sixth Form College and the
subjects they study.
Students study a number of subjects, and each subject has one subject leader.
The table below is a first attempt at the design of the database.
StudentID Name TutorGroup Tutor Subject Level SubjectLeader
History A AJH
S1000 Bella 2 CKE Geography A BJG
Economics AS CKE
English AS DRE
S2000 Jane 3 KPR French A FJF
Russian A KPR
English A DRE
S3000 Greg 1 DRE
Geography A BJG

(a) Explain, with reference to the data, why the table is not in First Normal Form (1NF). [2]
The table is not in 1NF because it contains multi-valued attributes (e.g., multiple
subjects, levels, and subject leaders stored in a single row for a student). This violates
the rule that each cell must contain a single value.

(b) The design is changed to:


Student (StudentID, Name, TutorGroup, Tutor)
StudentSubject (StudentID, Subject, Level, SubjectLeader)
Show how the data given in the table above would be held in these two tables. [3]
Table: Student

StudentID Name TutorGroup Tutor


StudentID Subject Level SubjectLeader
S1000 Bella 2 CKE
S1000 History A AJH
S2000 Jane 3 KPR
S1000 Geography A BJG
S3000 Greg 1 DRE
S1000 Economics AS CKE
Table: StudentSubject
S2000 English AS DRE

S2000 French A FJF

S2000 Russian A KPR 2


S3000 English A DRE

S3000 Geography A BJG


(c) A student is not allowed to study the same subject at A and AS Level. [1]
What is the primary key of the table StudentSubject?

(d) The two tables Student and StudentSubject are related. Explain how this is achieved
using a primary and a foreign key. [2]

(e) Explain why the table StudentSubject is not in Second Normal Form (2NF). [2]

(f) Explain why the table Student is not in Third Normal Form (3NF) [2]

[Total 25 Marks]

You might also like