wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Databases Nat 5

Total questions: 19

Worksheet time: 15mins

Name
Class
Date
1.

What field type would be used to store the following data "0125-5221"

a)

Text

b)

Number

c)

Time/Date

2.

What does the data values from a field need to be in order for it to be named as a Primary Key

a)

Values need to be number

b)

Values need to be even

c)

Values need to be unique

d)

Values need to be a combination of letters and numbers

3.

Which field is the best fit to be a primary key?

a)

FilmName

b)

FilmID

c)

AverageRating

d)

Director

4.

Which of these queries would display all the films directed by Steven Spielberg?

a)

SELECT FilmName, YearReleased

FROM Films

WHERE YearReleased = "2018"

b)

SELECT FilmName, Director

FROM Films

WHERE FilmName ="Jurassic Park"

c)

SELECT FilmName, Director

FROM Films

WHERE Director="Steven Spielberg"

d)

SELECT FilmName, Director

FROM Films

5.

How is the table being sorted?

a)

YearReleased Ascending

b)

AverageRating Descending

c)

AverageRating Ascending

d)

FilmName Ascending

6.

What is referential integrity?

a)

When the primary key is different from the foreign key and no changes are applied to either

b)

When the foreign key is similar to the primary key any changes are just applied to the foreign key

c)

When the primary key and the foreign key are the same and any changes are applied to both keys

7.

What kind of validation fits this description: Provides a list of values for the user to choose from

a)

Presence Check

b)

Field Length Check

c)

Restricted Choice

8.

What will this SQL statement do? SELECT username, activetime FROM userdetails WHERE online = TRUE;

a)

It will show all information from current online players

b)

It will show the username of any user who's played for longer than 50 mins

c)

It will show the username and amount of time they've been active of any user that is currently online

d)

It will show the username and amount of time they've been active of any user that is currently not online

9.

What kind of validation fits this description: check to see if data has been entered

a)

Presence Check

b)

Field Length Check

c)

Restricted Choice

10.

What kind of cardinality is displayed here?

a)

One to one

b)

One to many

c)

Many to many

11.

How is a primary key indicated in an ER Diagram?

a)

The field name is underlined

b)

The field name has an asterisk

c)

You just have to guess

12.

Which of the following is a definition of end user requirements?

a)

Any search/sort queries needing to be carried out on the DB

b)

A list of the tables, fields and relationship

c)

An explanation as to why the DB is required

d)

A list of users that will use the DB

13.

Which piece of validation shown can be defined as Range check

a)

("Cat", "Dog", "Tortoise", "Hamster")

b)

Length = 4

c)

>=10 and <=20

d)

Required: Yes

14.

Which is the only data type the field size is applied to?

a)

Boolean

b)

Date

c)

Number

d)

Text

15.

SELECT ALL THAT APPLY:

Name two implications of GDPR

a)

Data is held securely

b)

Data is used for the declared purpose only

c)

Data is set on fire after use

d)

All users have the right to talk to someone about their data 24/7

16.

If an SQL query is displaying all the fields correctly but is showing some records that don't meet the criteria it is said to be?

a)

Not fit for purpose

b)

Not accurate

c)

Fit for purpose

d)

Accurate

17.

Which is the correct UPDATE statement to update this address ( 99 Willow Way ) in a Staff table of the staff member with the code DD56

a)

UPDATE Staff

SET address = "99 Willow Way"

WHERE staffCode = "DD56"

b)

SET address = " 99 Willow Way"

WHERE staffCode = "DD56"

c)

UPDATE Staff

WHERE staffCode = "DD56"

d)

UPDATE Staff

SET address = "99 Willow Way"

18.

Why wouldn't this SQL query run?


SELECT name, address, phoneNum

FROM staff

WHERE name = "Bill"

ORDER BY address = ASC

a)

It's in the wrong order

b)

name = "Bill" is wrong

c)

Order by shouldn't have an equals sign

d)

It looks fine

19.

State why a database table should be designed to include a primary key field

a)

So that each record can be uniquely identified

b)

So it can be linked to other tables

c)

Because Access makes you have one