12
7 A driving school teaches people how to drive cars. The school has a relational database,
DRIVING_SCHOOL, to store information about instructors, students, lessons and the cars used by
instructors.
INSTRUCTOR(InstructorID, FirstName, LastName, DateOfBirth, Level)
CAR(Registration, Make, Model, EngineSize)
INSTRUCTOR_CAR(InstructorID, Registration)
STUDENT(StudentID, FirstName, LastName, DateOfBirth, Address1)
LESSON(LessonID, StudentID, InstructorID, LessonDate, LessonTime)
(a) Give two benefits to the driving school of using a relational database instead of a flat file.
1 .................................................................................................................................................
...................................................................................................................................................
2 .................................................................................................................................................
...................................................................................................................................................
[2]
(b) Complete the entity-relationship diagram for the database DRIVING_SCHOOL.
INSTRUCTOR INSTRUCTOR_CAR
LESSON CAR
STUDENT
[4]
© UCLES 2020 9608/11/M/J/20
13
(c) The table shows some sample data for the table INSTRUCTOR.
InstructorID FirstName LastName DateOfBirth Level
Ins01 Jayden Han 05/06/1974 1
Ins02 Freda Choi 06/02/1978 2
Ins03 Kelly Kim 01/12/1966 1
Ins04 Santana Thompson 09/09/1985 3
Complete the Data Definition Language (DDL) statement to create the table INSTRUCTOR.
………………………………………………………………………… TABLE INSTRUCTOR(
InstructorID VARCHAR(5),
FirstName VARCHAR(15),
LastName VARCHAR(15),
DateOfBirth DATE,
Level ………………………………………………………………………… ,
………………………………………………………………………… (InstructorID)
);
[3]
(d) The table STUDENT needs an additional field to store the student’s telephone number, for
example 012-3456.
Write a Data Definition Language (DDL) statement to add the new field to the table STUDENT.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
(e) Write a Data Manipulation Language (DML) statement to return the date and time of all future
lessons booked with the instructor whose InstructorID is Ins01.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [4]
© UCLES 2020 9608/11/M/J/20 [Turn over