Databases (Cambridge (CIE) O Level Computer Science)

Exam Questions

38 mins13 questions
11 mark

A database table, 2018MOV, is used to keep a record of movie details.

A table listing movies with columns for catalog number, title, two genres, Blu-ray, DVD, and streaming availability; 24 entries in total.

State the number of records in the database table.

Did this page help you?

21 mark
A table listing movies with columns for catalogue number, title, genres, and availability on Blu-ray, DVD, and streaming services.

Give the name of the field that would be used for the primary key.

Did this page help you?

32 marks

A database table, PERFORMANCE, is used to keep a record of the performances at a local theatre.

ShowNumber

Type

Title

Date

SoldOut

SN091

Comedy

An Evening at Home

01 Sept

Yes

SN102

Drama

Old Places

02 Oct

No

SN113

Jazz

Acoustic Evening

03 Nov

No

SN124

Classical

Mozart Evening

04 Dec

Yes

SN021

Classical

Bach Favourites

01 Feb

Yes

SN032

Jazz

30 Years of Jazz

02 Mar

Yes

SN043

Comedy

Street Night

03 Apr

No

SN054

Comedy

Hoot

04 May

No

State the number of fields and records in the table.

Did this page help you?

4a1 mark

A computer game shop records its stock levels in a database table called GAMES. The fields used in the stock table are shown.

Name

Description

GameID

primary key

GameName

the name of each game

AgeRestriction

the minimum age at which a person is allowed to play each game

GamePrice

the selling price for each game

NumberStock

the quantity of each game currently in stock

OnOrder

whether or not each game is on order from the suppliers

DateLastOrdered

the date the most recent order for each game was placed

GameDescription

a summary of the contents and purpose of each game

State the number of fields that are in the table GAMES.

4b1 mark

State one important fact that must be true for a field to be a primary key.

Did this page help you?

51 mark

A database table, NURSE, is used to keep a record of disposable items worn by veterinary nurses.

This is part of the table:

ItemNumber

Description

SingleUse

Uses

StockLevel

ReorderLevel

DIG1

Glove (pair)

Y

1

500

800

DIA1

Apron

Y

1

700

800

DIM5

Hair net

Y

1

650

500

DIA2

Apron

N

5

25

100

DIS4

Suit

N

3

70

50

DIV9

Shoe cover (pair)

Y

1

400

250

Give a reason why the field SingleUse is not required in the table NURSE.

Did this page help you?

6a2 marks

A database table called TVRange shows the main features and prices of a range of televisions.

A table listing TV models with their specifications: screen size, satellite capability, Smart TV, soundbar inclusion, and prices ranging from $650 to $9750.

Give the name of the field that is most suitable to be the primary key.

State the reason for this choice.

6b2 marks

The database uses the data types:

  • text

  • character

  • Boolean

  • integer

  • real

  • date/time

Complete the table to show the most appropriate data type for each field. Each data type must be different.

Field

Data type

TVCode

ScreenSize

SmartTV

Price$

Did this page help you?

7a2 marks

A database table called TVRange shows the main features and prices of a range of televisions.

A table listing TV models with their specifications: screen size, satellite capability, Smart TV, soundbar inclusion, and prices ranging from $650 to $9750.

Give the name of the field that is most suitable to be the primary key.

State the reason for this choice.

7b2 marks

Complete the table to identify the most appropriate data type for the fields in Songs

Field

Data type

SongNumber

Title

Recorded

Minutes

Did this page help you?

82 marks

Describe what a field is in a database.

Provide an example of a field in a student database

Did this page help you?

12 marks

A database table, PERFORMANCE, is used to keep a record of the performances at a local theatre.

ShowNumber

Type

Title

Date

SoldOut

SN091

Comedy

An Evening at Home

01 Sept

Yes

SN102

Drama

Old Places

02 Oct

No

SN113

Jazz

Acoustic Evening

03 Nov

No

SN124

Classical

Mozart Evening

04 Dec

Yes

SN021

Classical

Bach Favourites

01 Feb

Yes

SN032

Jazz

30 Years of Jazz

02 Mar

Yes

SN043

Comedy

Street Night

03 Apr

No

SN054

Comedy

Hoot

04 May

No

Give two validation checks that could be performed on the ShowNumber field

Did this page help you?

2a2 marks

A database table contains the following fields:

  • StudentID (integer)

  • FirstName (text)

  • LastName (text)

  • DateOfBirth (date)

  • Email (text)

Identify which field could benefit from a format check validation and justify your answer

2b2 marks

Identify which field would require a type check validation and justify your answer.

Did this page help you?

13 marks

Consider the following database table for an online shopping system:

OrderID

CustomerName

ProductCode

Quantity

PricePerUnit

TotalPrice

1001

John Smith

PC12345

3

19.99

59.9

Suggest two different types of validation that could be applied to the ProductCode field.

Explain why they would be important.

Did this page help you?

26 marks

A school database is used to store information about students and their exam scores. The following fields have been identified:

  • StudentID

  • FirstName

  • LastName

  • DateOfBirth

  • ExamScore

  • PassedExam

Describe the most appropriate data type for each of the following fields and justify your choice.

  • StudentID

  • ExamScore

  • PassedExam

Did this page help you?

3a4 marks

In a database for an online store, there are two tables: Customers and Orders.

  1. Customers Table:

CustomerID

Name

Email

PhoneNumber

C001

Alice Brown

[email protected]

0123456789

C002

Bob Smith

[email protected]

0987654321

  1. Orders Table:

OrderID

CustomerID

OrderDate

TotalAmount

O001

C001

2024-08-01

150.00

O002

C002

2024-08-02

200.00

Identify the primary key for each table and explain why it is suitable.

3b2 marks

Describe how you would use the CustomerID field in the Orders table to link it to the Customers table.

Did this page help you?