0% found this document useful (0 votes)
113 views28 pages

9608/11/M/J/16 © Ucles 2016

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
113 views28 pages

9608/11/M/J/16 © Ucles 2016

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 28

QUESTION 4.

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.

(a) The school is considering changing to a DBMS.

(i) State what DBMS stands for.

.......................................................................................................................................[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]

(iii) A feature of the DBMS software is a query processor.

Describe how the school secretary could use this software.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[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]

© UCLES 2016 9608/11/M/J/16 [Turn over


10

(b) The database design has three tables to store the classes that students attend.

STUDENT(StudentID, FirstName, LastName, Year, TutorGroup)

CLASS(ClassID, Subject)

CLASS-GROUP(StudentID, ClassID)

Primary keys are not shown.

There is a one-to-many relationship between CLASS and CLASS–GROUP.

(i) Describe how this relationship is implemented.

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(ii) Describe the relationship between CLASS-GROUP and STUDENT.

.......................................................................................................................................[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]

© UCLES 2016 9608/11/M/J/16


11

Question 9 begins on page 12.

© UCLES 2016 9608/11/M/J/16 [Turn over


QUESTION 5. 8

5 (a) A Database Management System (DBMS) provides the following features.

Draw a line to match each feature with its description.

Feature Description

A file or table containing all the details of the


database design
Data dictionary

Data design features to ensure the validity


of data in the database

Data security

A model of what the database will look like,


although it may not be stored in this way

Data integrity Methods of protecting the data including


the uses of passwords and different access
rights for different users of the database

[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.

(b) The school needs to safeguard against any data loss.

Describe three factors to consider when planning a backup procedure for the data.

Justify your decisions.

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

StudentID FirstName LastName Tutor

001AT Ahmad Tan 11A

003JL Jane Li 11B

011HJ Heather Jones 10A

QUALIFICATION

QualCode Level Subject

CS1 IGCSE Computer Science

MT9 IGCSE Maths

SC12 IGCSE Science

STUDENT-QUALIFICATION

QualCode StudentID Grade DateOfAward

SC12 011HJ A 31/8/2014

SC12 003JL C 31/8/2014

CS1 003JL B 31/8/2014

(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]

© UCLES 2016 9608/13/M/J/16 [Turn over


10

(iii) Describe how the relationship between QUALIFICATION and


STUDENT-QUALIFICATION is implemented.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[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]

(b) (i) Explain why a computer needs an operating system.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[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.

Describe what is meant by a DLL file.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[2]

© UCLES 2016 9608/11/O/N/16 [Turn over


QUESTION 7. 11

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]

© UCLES 2016 9608/12/O/N/16 [Turn over


10

8 A programmer is writing a program that includes code from a program library.

(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.

(i) Describe two benefits of using DLL files.

1 ........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[4]

(ii) State one drawback of using DLL files.

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

© UCLES 2016 9608/12/O/N/16


QUESTION 8. 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

(a) Describe the relationship shown above.

...................................................................................................................................................

...............................................................................................................................................[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)

A-NURSE(NurseID, FirstName, FamilyName, ...........................................................)

(i) Complete the design for the A-NURSE table. [1]

(ii) Explain how the relationship in part (a) is implemented.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[2]

(c) In Area B of the hospital, there are a number of wards and a number of nurses.

Each Area B ward has a specialism.

Each Area B nurse has a specialism.

A nurse can be asked to work in any of the Area B wards where their specialism matches with
the ward specialism.

The relationship for Area B of the hospital is:

B-NURSE B-WARD

(i) Explain what the degree of relationship is between the entities B-NURSE and B-WARD.

...........................................................................................................................................

.......................................................................................................................................[1]

© UCLES 2017 9608/11/M/J/17


3

(ii) The design for the Area B data is as follows:

B-NURSE(NurseID, FirstName, FamilyName, Specialism)

B-WARD(WardName, NumberOfBeds, Specialism)

B-WARD-NURSE( ............................................................................................................ )

Complete the attributes for the third table. Underline its primary key. [2]

(iii) Draw the relationships on the entity-relationship (E-R) diagram.

B-NURSE B-WARD

B-WARD-NURSE

[2]

(d) Use the table designs in part (c)(ii).

(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.

Write an SQL command to update her record.

UPDATE .............................................................................................................................

SET ....................................................................................................................................

WHERE ...............................................................................................................................
[3]

© UCLES 2017 9608/11/M/J/17 [Turn over


QUESTION 9. 2

1 Some shops belong to the Rainbow Retail buying group. They buy their goods from one or more
suppliers.

Each shop has:

• a unique shop ID
• a single retail specialism (for example, food, electrical, garden).

Each supplier has:

• 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]

The database design is as follows:

SHOP(ShopID, ShopName, Location, RetailSpecialism)

SUPPLIER(SupplierID, SupplierName, ContactPerson, RetailSpecialism)

SHOP-SUPPLIER(ShopID, SupplierID)

The SHOP–SUPPLIER table stores the suppliers that each shop has previously used.

Primary keys are not shown.

(b) (i) Label the entities and draw the relationships to complete the revised E-R diagram.

SUPPLIER

[3]

© UCLES 2017 9608/12/M/J/17


3

(ii) Complete the following table to show for each database table:

• the primary key


• the foreign key(s) (if any):
° Each table may contain none, one or more foreign key(s).
° For a table with no foreign key, write ‘None’.
• an explanation for the use of any foreign key.

Table Primary key Foreign key(s) Explanation


(if any)

SHOP

SUPPLIER

SHOP–SUPPLIER

[5]

(iii) The database designer has implemented SUPPLIER.ContactPerson as a secondary


key.

Describe the reason for this.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[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.

Write an SQL script to add this data to the database.

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[3]

© UCLES 2017 9608/12/M/J/17 [Turn over


QUESTION 10. 14

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.

PATIENT(PatientID, PatientName, Address, Gender)

DOCTOR(DoctorID, Gender, Qualification)

APPOINTMENT(AppointmentDate, AppointmentTime, DoctorID, PatientID)


[2]

(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]

© UCLES 2017 9608/11/O/N/17


15

(c) The doctors are about to set up a new clinic in the neighbouring village, SITE-B.

The original location is identified as SITE-A.

A new table is designed to store the ID of the doctor who is able to work at each site.

DOCTOR-AVAILABILITY(DoctorID, Site)

Five entries stored in the table are:

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.

Show the revised APPOINTMENT table.

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]

© UCLES 2017 9608/11/O/N/17 [Turn over


QUESTION 11. 11

7 A company takes customer service for its clients very seriously.

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.

STAFF(StaffID, StaffName, Department)

CLIENT(ClientName, Address, Town)

VISIT(ClientName, VisitDate)

INTERVIEW(ClientName, VisitDate, StaffID, SpecialistFocus, InterviewText)


[3]

(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]

© UCLES 2017 9608/12/O/N/17 [Turn over


QUESTION 12. 14

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.

MOVIE(MovieID, Title, Length, Rating)

SCREEN(ScreenNumber, NumberSeats)

MOVIESCHEDULE(ScheduleID, MovieID, ScreenNumber, Time)

(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]

© UCLES 2018 9608/11/O/N/18


15

(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]

© UCLES 2018 9608/11/O/N/18


QUESTION 13. 7

3 Kimmy has written a program in a high-level language.

(a) Kimmy has used library routines in the program.

(i) Describe two advantages of using library routines in the program.

1 ........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

2 ........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]

(ii) Describe what is meant by a Dynamic Link Library (DLL).

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(b) Three translators are compilers, interpreters, and assemblers.

(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]

© UCLES 2019 9608/11/M/J/19 [Turn over


QUESTION 14. 7

3 A company uses a relational database, EMPLOYEES, to store data about its employees and
departments.

(a) The company uses a Database Management System (DBMS).

(i) The DBMS has a data dictionary.

Describe what the data dictionary stores.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) The DBMS has a query processor.

Describe the purpose of a query processor.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(b) Relationships are created between tables using primary and foreign keys.

Describe the role of a primary and a foreign key in database relationships.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2019 9608/13/M/J/19 [Turn over


8

(c) In the company:

• An employee can be a manager.


• A department can have several managers and several employees.
• An employee can only belong to one department.

The EMPLOYEES database has three tables:

EMPLOYEE_DATA(EmployeeID, FirstName, LastName, DateOfBirth, Gender,


DepartmentNumber)
DEPARTMENT(DepartmentNumber, DepartmentName)
DEPARTMENT_MANAGER(DepartmentNumber, EmployeeID, role)

Complete the entity-relationship (E-R) diagram for the EMPLOYEES database.

EMPLOYEE_DATA

DEPARTMENT_MANAGER DEPARTMENT

[3]

(d) Give three reasons why the EMPLOYEES database is fully normalised.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2019 9608/13/M/J/19


9

(e) Part of the EMPLOYEE_DATA table is shown.

EmployeeID FirstName LastName DateOfBirth Gender DepartmentNumber


156FJEK Harvey Kim 12/05/1984 Male S1
558RRKL Catriona Moore 03/03/1978 Female F2
388LMDV Oscar Ciao 01/01/1987 Male F2

(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]

© UCLES 2019 9608/13/M/J/19 [Turn over


10

(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]

© UCLES 2019 9608/13/M/J/19


QUESTION 15. 6

4 Anushka needs to store information about bookings at a sports club.

(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.

Complete the statements by filling in the missing words.

For a database to be in First Normal Form (1NF) there must be no ..................................

groups of attributes.

For a database to be in Second Normal Form (2NF), it must be in 1NF, and contain no

.................................. key dependencies.

For a database to be in Third Normal Form (3NF), it must be in 2NF, and all attributes

must be fully dependent on the .................................. .................................. .


[4]

© UCLES 2019 9608/12/O/N/19


7

(b) The normalised relational database, SPORTS_CLUB, has the following table design.

MEMBER(MemberID, FirstName, LastName, MembershipType)

SESSION(SessionID, Description, SessionDate, SessionTime, NumberMembers)

TRAINER(TrainerID, TrainerFirstName, TrainerLastName)

MEMBER_SESSION(MemberID, SessionID)

SESSION_TRAINER(SessionID, TrainerID)

(i) Anushka has designed an entity-relationship (E-R) diagram for SPORTS_CLUB.

Complete the entity-relationship (E-R) diagram.

MEMBER SESSION

MEMBER_SESSION SESSION_TRAINER

TRAINER

[2]

(ii) Anushka first needs to create the database that she has designed.

Write a Data Definition Language (DDL) statement to create the SPORTS_CLUB


database.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2019 9608/12/O/N/19 [Turn over


8

(iii) The table shows some sample data for the table SESSION.

SessionID Description SessionDate SessionTime NumberMembers


21PL Pilates junior 04/04/2020 18:00 15
13AE Aerobics senior 04/04/2020 19:00 20
Weightlifting
33WG 04/04/2020 10:00 10
advanced

Write a DDL script to create 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]

© UCLES 2019 9608/12/O/N/19


QUESTION 16. 7

3 A hotel needs to record information about customers and their bookings.

(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]

© UCLES 2019 9608/13/O/N/19 [Turn over


8

(iii) Identify one foreign key in the tables that you designed in part (a)(i).

Table name ........................................................................................................................

Foreign key .......................................................................................................................


[1]

(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:

Developer interface ..................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Query processor .......................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[5]

(c) The following table has four SQL scripts.

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.

Script DDL DML

CREATE TABLE FILMS

SELECT FilmID FROM FILMS

ALTER TABLE FILMS ADD PRIMARY KEY (FilmID)

CREATE DATABASE MYDATA


[2]

© UCLES 2019 9608/13/O/N/19

You might also like