Databases and SQL – A Level Computer Science (old syllabus, to 2021) (9608)

25 questions · page 2 of 2

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
16
9608/11/O/N/17 · Question 3Oct/Nov 2017Paper 1110 marks
Loading question…
Question text

3
A Local Area Network is used by staff in a hospital to access data stored in a Database Management
System (DBMS).
(a) Name two security measures to protect computer systems.
1 …
2 …
[2]
(b) A frequent task for staff is to key in new patient data from a paper document. The document
includes the patient’s personal ID number.
(i)
The Patient ID is a seven digit number. The database designer decides to use a check
digit to verify each foreign key value that a user keys in for a Patient ID.
When a user assigns a primary key value to a Patient ID, the DBMS adds a modulus-11
check digit as an eighth digit. The DBMS uses the weightings 6, 5, 4, 3, 2 and 1 for
calculating the check digit. It uses 6 as the multiplier for the most significant (leftmost)
digit.
Show the calculation of the check digit for the Patient ID with the first six digits 786531.
Complete Patient ID … [4]
(ii)
Name and describe two validation checks that the DBMS could carry out on each
primary key value that a user keys in for a Patient ID.
1
Validation check …
Description …
…
2
Validation check …
Description …
…
[4]

17
9608/11/O/N/17 · Question 7Oct/Nov 2017Paper 1116 marks
Loading question…
Question text

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]
(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]
(e) Write an SQL script to display the date and time of all appointments made by the patient with
the PatientID of 556.
…
…
… [3]
Permission to reproduce items where third-party

18
9608/12/O/N/17 · Question 3Oct/Nov 2017Paper 1210 marks
Loading question…
Question text

3
A Local Area Network is used by school staff who access data stored in a Database Management
System (DBMS).
(a) (i)
Explain the difference between security and privacy of data.
…
…
…
…
…
… [3]
(ii)
Give an example for this application where privacy of data is a key concern.
…
… [1]
(b) Name and describe two security measures the Network Manager has in place to protect the
security of the data held in the DBMS.
1 …
…
…
…
2 …
…
…
…
[4]
(c) A task for staff at the start of the school year is to key in new pupil data from a paper document.
The data is entered to a screen form and includes the data verification of some fields.
Describe what is meant by verification.
…
…
…
… [2]

Advertisement
19
9608/12/O/N/17 · Question 7Oct/Nov 2017Paper 1216 marks
Loading question…
Question text

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
VISIT
CLIENT
B
VISIT
INTERVIEW
C
INTERVIEW
STAFF
[3]
(b) The company decides to produce a visit report, VisitReportText, for each visit made.
This text will be produced from the one or more interview texts obtained at the visit.
State how one or more of the given table designs can be changed to add this attribute.
…
… [1]
(c) Client ABC Holdings are now trading under the name of Albright Holdings.
(i)
Write an SQL script to update this client’s record in the database.
UPDATE …
SET …
WHERE …
[3]
(ii)
Describe why this update could cause problems with the existing data stored.
…
…
… [2]
(d) Write an SQL script to display the Staff ID of each member of staff who performed an interview
when they visited New Age Toys on 13/10/2016.
…
…
… [3]
(e) At present, all interviews are performed in the UK. Many clients now operate in other countries
in Europe. The company wants to perform interviews with the client’s staff in other countries.
Not all interview staff are willing to travel outside of the UK.
State how one or more of the table designs should be revised to store this information.
…
…

20
9608/11/M/J/17 · Question 1May/June 2017Paper 1115 marks
Loading question…
Question text

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

21
9608/12/M/J/17 · Question 1May/June 2017Paper 1217 marks
Loading question…
Question text

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

22
9608/11/O/N/16 · Question 1Oct/Nov 2016Paper 118 marks
Loading question…
Question text

1
(a) Five descriptions and seven relational database terms are shown below.
Draw a line to link each description to its correct database term.
Description
Database term
Any object, person or thing about which
it is possible to store data
Secondary key
Candidate key
Dataset organised in rows and columns;
the columns form the structure and the
rows form the content
Entity
Any attribute or combination of attributes
Foreign key
that can act as a unique key
Primary key
Attribute(s) in a table that link to the
primary key in another table to form a
relationship
Table
Tuple
Attribute or combination of attributes that
is used to uniquely identify a record
[5]
(b) Explain what is meant by referential integrity.
…
…
…
…
…
… [3]

23
9608/12/O/N/16 · Question 9Oct/Nov 2016Paper 1214 marks
Loading question…
Question text

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]
(c) The CLASS table has primary key ClassID and stores the following data:
ClassID
Description
StartDate
ClassTime NoOfSessions
AdultsOnly
DAY01
Yoga beginners
12/01/2016
11:00
5
TRUE
EVE02
Yoga beginners
12/01/2016
19:00
5
FALSE
DAY16
Circuits
30/06/2016
10:30
4
FALSE
Write an SQL script to create the CLASS table.
…
…
…
…
…
…
…
…
…
…

Advertisement
24
9608/11/M/J/16 · Question 8May/June 2016Paper 1121 marks
Loading question…
Question text

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]
(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]
Describe the relationship between CLASS-GROUP and STUDENT.
(ii)
…

25
9608/13/M/J/16 · Question 5May/June 2016Paper 1323 marks
Loading question…
Question text

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]
(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]
State the type of relationship that exists between STUDENT and
(ii)
STUDENT-QUALIFICATION.
… [1]
Describe how the relationship between QUALIFICATION and
(iii)
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.
…
…

Advertisement