Testing (SQA National 5 Computing Science): Exam Questions

Exam code: X816 75

4 mins2 questions
1
3 marks

Bright Stars organise and run classes for children. Classes are organised into blocks, each running for 8 weeks.

The table Class stores data about the classes available.

The table Booking stores data about the children and their parents/guardians.

Sample data from each table is shown below.

Class

classID

leaderName

day

time

location

sessionBlock

classAge

S1-141

Suzanne

Mon

10:45

Grange

Summer

1-2 Years

S2-228

Claire

Tue

11:50

Lothianburn

Autumn

3-4 Years

S2-871

Jo

Mon

13:00

Gorebridge

Spring

3-4 Years

B1-121

David

Thur

15:30

Biggar

Winter

Babies

S1-333

Alexander

Wed

13:00

Coldingham

Summer

1-2 Years

S2-519

Claire

Fri

10:45

Lothianburn

Autumn

3-4 Years

B3-435

Jose

Wed

09:30

Gorebridge

Spring

Babies

Booking

bookingID

parentName

email

childName

childDOB

paid

classID

EF220731

Esme Faulds

[email protected] (opens in a new tab)

Quinn

25/09/2022

No

S1-333

TR238270

Tim Roberts

[email protected] (opens in a new tab)

Lucas

05/02/2023

Yes

B1-121

ZA200836

Zoe Archer

[email protected] (opens in a new tab)

Blake

11/01/2020

Yes

S2-288

FY229853

Fen Yang

[email protected] (opens in a new tab)

Freya

06/06/2022

No

S1-333

Some data needs to be removed from the class table.

(i) Claire is no longer able to run the 3-4 Years class on a Tuesday in the Autumn block.

The SQL statement below is written to make the change.

DELETE FROM Class
WHERE leaderName = "Claire"
AND classAge = "3-4 Years";

Give one reason why this SQL statement is not fit for purpose.

[1]

(ii) The Gorebridge classes are no longer running.

Write the SQL statement to remove all the Gorebridge classes.

[2]

2
1 mark

A database table stores the following data.

Result

forename

surname

test1

test2

Julie

White

7

92

Aaima

Waheed

34

67

Chun

Yang

27

52

Olivia

Arran

58

98

Mia

Branan

78

90

Claire

McKay

10

7

Scott

Harper

42

47

Describe how the above SQL statement could be tested.