9608/11/M/J/16 © Ucles 2016
9608/11/M/J/16 © Ucles 2016
8 A school stores a large amount of data. This includes student attendance, qualification, and
contact details. The school’s software uses a file-based approach to store this data.
.......................................................................................................................................[1]
(ii) Describe two ways in which the Database Administrator (DBA) could use the DBMS
software to ensure the security of the student data.
1 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[4]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(iv) The DBMS has replaced software that used a file-based approach with a relational
database.
Describe how using a relational database has overcome the previous problems
associated with a file-based approach.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
(b) The database design has three tables to store the classes that students attend.
CLASS(ClassID, Subject)
CLASS-GROUP(StudentID, ClassID)
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
.......................................................................................................................................[1]
(iii) Write an SQL script to display the StudentID and FirstName of all students who are
in the tutor group 10B. Display the list in alphabetical order of LastName.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[4]
(iv) Write an SQL script to display the LastName of all students who attend the class whose
ClassID is CS1.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[4]
Feature Description
Data security
[3]
A school stores a large amount of data that includes student attendance, qualification and contact
details. The school is setting up a relational database to store these data.
Describe three factors to consider when planning a backup procedure for the data.
1 ................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
3 ................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[6]
© UCLES 2016 9608/13/M/J/16
9
(c) The database design has three tables to store the qualifications and grades each student has
attained. The following is a sample of the data from each table.
STUDENT
QUALIFICATION
STUDENT-QUALIFICATION
(i) Draw an Entity-Relationship (E-R) diagram to show the relationships between these
three tables.
[2]
(ii) State the type of relationship that exists between STUDENT and
STUDENT-QUALIFICATION.
.......................................................................................................................................[1]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(d) (i) The database will store each student’s date of birth.
Write an SQL script to add a date of birth attribute to the appropriate table.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(ii) Write an SQL script to display the StudentID, Grade and DateOfAward for the
QualCode value of SC12.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
(iii) Write an SQL script to display the FirstName and LastName and QualCode for all
STUDENT-QUALIFICATIONs for which the Grade value is A.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[4]
© UCLES 2016 9608/13/M/J/16
QUESTION 6. 3
2 (a) State two differences between Static RAM (SRAM) and Dynamic RAM (DRAM).
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...............................................................................................................................................[2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(ii) Give two key management tasks carried out by an operating system.
1 ........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
.......................................................................................................................................[2]
(c) New program code is to be written in a high-level language. The use of Dynamic Link Library
(DLL) files is considered in the design.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
9 A health club offers classes to its members. A member needs to book into each class in advance.
(a) The health club employs a programmer to update the class booking system. The programmer
has to decide how to store the records. The choice is between using a relational database or
a file-based approach.
Give three reasons why the programmer should use a relational database.
1 ................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
3 ................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[6]
(b) The programmer decides to use three tables: MEMBER, BOOKING and CLASS.
Complete the Entity-Relationship (E-R) diagram to show the relationships between these
tables.
MEMBER CLASS
BOOKING
[2]
(a) Describe two benefits to the programmer of using one or more library routines.
1 ................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[4]
(b) The programmer decides to use a Dynamic Link Library (DLL) file.
1 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[4]
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
1 A hospital is divided into two areas, Area A and Area B. Each area has several wards. All the ward
names are different.
A number of nurses are based in Area A. These nurses always work on the same ward. Each
nurse has a unique Nurse ID of STRING data type.
A-NURSE A-WARD
...................................................................................................................................................
...............................................................................................................................................[1]
(b) A relational database is created to store the ward and nurse data. The two table designs for
Area A are:
A-WARD(WardName, NumberOfBeds)
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(c) In Area B of the hospital, there are a number of wards and a number of nurses.
A nurse can be asked to work in any of the Area B wards where their specialism matches with
the ward specialism.
B-NURSE B-WARD
(i) Explain what the degree of relationship is between the entities B-NURSE and B-WARD.
...........................................................................................................................................
.......................................................................................................................................[1]
B-WARD-NURSE( ............................................................................................................ )
Complete the attributes for the third table. Underline its primary key. [2]
B-NURSE B-WARD
B-WARD-NURSE
[2]
(i) Write an SQL query to display the Nurse ID and family name for all Area B nurses with a
specialism of ‘THEATRE’.
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
(ii) Fatima Woo is an Area B nurse with the nurse ID of 076. She has recently married, and
her new family name is Chi.
UPDATE .............................................................................................................................
SET ....................................................................................................................................
WHERE ...............................................................................................................................
[3]
1 Some shops belong to the Rainbow Retail buying group. They buy their goods from one or more
suppliers.
• a unique shop ID
• a single retail specialism (for example, food, electrical, garden).
• a unique supplier ID
• a similar single specialism recorded.
Rainbow Retail creates a relational database to record data about the shops and their suppliers.
The entity-relationship (E-R) diagram for the relationship between the SHOP and SUPPLIER tables
is shown.
SHOP SUPPLIER
(a) Explain what the degree of relationship is between the entities SHOP and SUPPLIER.
...................................................................................................................................................
...............................................................................................................................................[1]
SHOP-SUPPLIER(ShopID, SupplierID)
The SHOP–SUPPLIER table stores the suppliers that each shop has previously used.
(b) (i) Label the entities and draw the relationships to complete the revised E-R diagram.
SUPPLIER
[3]
(ii) Complete the following table to show for each database table:
SHOP
SUPPLIER
SHOP–SUPPLIER
[5]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(c) (i) Write an SQL query to display the shop ID and location of all shops with a ‘GROCERY’
specialism.
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
(ii) The existing shop with ID 8765 has just used the existing supplier SUP89 for the first
time.
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
7 A clinic is staffed by several doctors. The clinic serves thousands of patients. Each day and at any
one time, there is only one doctor in the clinic available for appointments.
The clinic stores patient, doctor and appointment data in a relational database.
(a) (i) Underline the primary key for each table in the following suggested table designs.
(ii) Complete the following entity-relationship (E-R) diagram for this design.
[2]
(b) The doctors are concerned that many patients make appointments but do not attend them.
Describe the changes to the table designs that could be made to store this information.
...................................................................................................................................................
...............................................................................................................................................[2]
(c) The doctors are about to set up a new clinic in the neighbouring village, SITE-B.
A new table is designed to store the ID of the doctor who is able to work at each site.
DOCTOR-AVAILABILITY(DoctorID, Site)
DoctorID Site
098 SITE-A
074 SITE-A
117 SITE-B
098 SITE-B
033 SITE-B
(i) State what this data shows about the availability of the doctor with the ID of 098.
...........................................................................................................................................
.......................................................................................................................................[1]
(ii) Opening a new clinic in the neighbouring village will not require any additional table for
storing appointments. It will need a change to the existing appointment table design.
APPOINTMENT( ................................................................................................................
................................................................................................................................... ) [1]
(d) The doctor with the ID of 117 has recently been allocated a new DoctorID of 017.
(i) Write an SQL script to update this doctor’s record in the database.
UPDATE .............................................................................................................................
SET .....................................................................................................................................
WHERE ...............................................................................................................................
[3]
(ii) Describe why this update could cause problems with the existing data stored.
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
The client
• The client names are unique.
A visit
• The company arranges a date for a visit to gather feedback from a client.
• A visit to a client never takes more than one day.
• Over time, the client receives many visits.
Staff (Interviewers)
• One or more staff attend the visit.
• If there is more than one staff member visiting, each performs a separate interview.
Interviews
• Each interview is classified as either ‘general’ or by some specialism, for example, marketing,
customer service or sales.
• A report is produced for each interview, InterviewText.
• Each interview is conducted by a single staff member.
The client, visit, staff and interview data will be stored in a relational database.
(a) (i) Underline the primary key for each table in the following suggested table designs.
VISIT(ClientName, VisitDate)
(ii) For each of the pairs of entities, A, B and C, draw the relationship between the two
entities.
A CLIENT VISIT
B VISIT INTERVIEW
C INTERVIEW STAFF
[3]
7 A movie theatre has a relational database that stores the movie schedule, and information about
the movies. The theatre has several screens that play movies at the same time.
The database has three tables to store information about the movies, the screens and the movie
schedule.
SCREEN(ScreenNumber, NumberSeats)
(a) Complete the entity-relationship (E-R) diagram to show the relationships between these
tables.
MOVIE SCREEN
MOVIESCHEDULE
[2]
(b) Explain how primary and foreign keys are used to link the tables in the movie theatre
database.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[4]
(c) The database needs to store the name of the company that produced each movie, for
example, Rocking Movies.
Write an SQL script to add the attribute ProductionCompany to the MOVIE table.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
(d) Write an SQL script to display the title and rating of all movies scheduled to play on screen
number 3.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[4]
1 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
[4]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
(i) State one benefit of Kimmy using an interpreter during the development of the program.
...........................................................................................................................................
..................................................................................................................................... [1]
(ii) State three benefits of Kimmy using a compiler when the program is complete.
1 ........................................................................................................................................
...........................................................................................................................................
2 ........................................................................................................................................
...........................................................................................................................................
3 ........................................................................................................................................
...........................................................................................................................................
[3]
3 A company uses a relational database, EMPLOYEES, to store data about its employees and
departments.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
(b) Relationships are created between tables using primary and foreign keys.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
EMPLOYEE_DATA
DEPARTMENT_MANAGER DEPARTMENT
[3]
(d) Give three reasons why the EMPLOYEES database is fully normalised.
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
3 ................................................................................................................................................
...................................................................................................................................................
[3]
(i) Write a Data Definition Language (DDL) statement to create the EMPLOYEES database.
...........................................................................................................................................
..................................................................................................................................... [1]
(ii) Write a DDL statement to define the table EMPLOYEE_DATA, and declare EmployeeID
as the primary key.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [5]
(iii) Write a Data Manipulation Language (DML) statement to return the first name and last
name of all female employees in the department named Finance.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [5]
(a) Anushka has a file-based storage system. She wants a relational database.
(i) Describe the features of a relational database that address the limitations of Anushka’s
file-based system.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [4]
(ii) The relational database design needs to be normalised. The following statements
describe the three stages of database normalisation.
groups of attributes.
For a database to be in Second Normal Form (2NF), it must be in 1NF, and contain no
For a database to be in Third Normal Form (3NF), it must be in 2NF, and all attributes
(b) The normalised relational database, SPORTS_CLUB, has the following table design.
MEMBER_SESSION(MemberID, SessionID)
SESSION_TRAINER(SessionID, TrainerID)
MEMBER SESSION
MEMBER_SESSION SESSION_TRAINER
TRAINER
[2]
(ii) Anushka first needs to create the database that she has designed.
...........................................................................................................................................
..................................................................................................................................... [1]
(iii) The table shows some sample data for the table SESSION.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [5]
(iv) Write a Data Manipulation Language (DML) script to return the first name and last name
of all members who have Peak membership type.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [3]
(a) The hotel has two types of room: double and family. Each room has a unique room number.
The hotel stores information about the customers including their name, address and contact
details.
When a customer books a room, they give the start date and the number of nights they want
to stay. If a customer wants more than one room, each room must have a separate booking.
Each booking has an ID number.
The hotel creates a normalised, relational database to store the required information. There
are three tables:
• CUSTOMER
• ROOM
• BOOKING
(i) Complete the database design for the hotel by writing the attributes for each table.
CUSTOMER( .......................................................................................................................
...........................................................................................................................................
........................................................................................................................................ )
ROOM( ...............................................................................................................................
...........................................................................................................................................
........................................................................................................................................ )
BOOKING( .........................................................................................................................
...........................................................................................................................................
........................................................................................................................................ )
[3]
(ii) Identify the primary key for each table that you designed in part (a)(i).
CUSTOMER .........................................................................................................................
ROOM ..................................................................................................................................
BOOKING ...........................................................................................................................
[2]
(iii) Identify one foreign key in the tables that you designed in part (a)(i).
(b) The hotel wants to use a Database Management System (DBMS) to set up and manage the
database.
Describe, using examples, how the hotel can use the following DBMS tools:
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
[5]
Tick (✓) one box in each row to identify whether the script is an example of a Data Definition
Language (DDL) statement or a Data Manipulation Language (DML) statement.