Font size
WorksheetsDatabases Nat 5
Total questions: 19
Worksheet time: 15mins
What field type would be used to store the following data "0125-5221"
Text
Number
Time/Date
What does the data values from a field need to be in order for it to be named as a Primary Key
Values need to be number
Values need to be even
Values need to be unique
Values need to be a combination of letters and numbers
Which field is the best fit to be a primary key?
FilmName
FilmID
AverageRating
Director
Which of these queries would display all the films directed by Steven Spielberg?
SELECT FilmName, YearReleased
FROM Films
WHERE YearReleased = "2018"
SELECT FilmName, Director
FROM Films
WHERE FilmName ="Jurassic Park"
SELECT FilmName, Director
FROM Films
WHERE Director="Steven Spielberg"
SELECT FilmName, Director
FROM Films
How is the table being sorted?
YearReleased Ascending
AverageRating Descending
AverageRating Ascending
FilmName Ascending
What is referential integrity?
When the primary key is different from the foreign key and no changes are applied to either
When the foreign key is similar to the primary key any changes are just applied to the foreign key
When the primary key and the foreign key are the same and any changes are applied to both keys
What kind of validation fits this description: Provides a list of values for the user to choose from
Presence Check
Field Length Check
Restricted Choice
What will this SQL statement do? SELECT username, activetime FROM userdetails WHERE online = TRUE;
It will show all information from current online players
It will show the username of any user who's played for longer than 50 mins
It will show the username and amount of time they've been active of any user that is currently online
It will show the username and amount of time they've been active of any user that is currently not online
What kind of validation fits this description: check to see if data has been entered
Presence Check
Field Length Check
Restricted Choice
What kind of cardinality is displayed here?
One to one
One to many
Many to many
How is a primary key indicated in an ER Diagram?
The field name is underlined
The field name has an asterisk
You just have to guess
Which of the following is a definition of end user requirements?
Any search/sort queries needing to be carried out on the DB
A list of the tables, fields and relationship
An explanation as to why the DB is required
A list of users that will use the DB
Which piece of validation shown can be defined as Range check
("Cat", "Dog", "Tortoise", "Hamster")
Length = 4
>=10 and <=20
Required: Yes
Which is the only data type the field size is applied to?
Boolean
Date
Number
Text
SELECT ALL THAT APPLY:
Name two implications of GDPR
Data is held securely
Data is used for the declared purpose only
Data is set on fire after use
All users have the right to talk to someone about their data 24/7
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?
Not fit for purpose
Not accurate
Fit for purpose
Accurate
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
UPDATE Staff
SET address = "99 Willow Way"
WHERE staffCode = "DD56"
SET address = " 99 Willow Way"
WHERE staffCode = "DD56"
UPDATE Staff
WHERE staffCode = "DD56"
UPDATE Staff
SET address = "99 Willow Way"
Why wouldn't this SQL query run?
SELECT name, address, phoneNum
FROM staff
WHERE name = "Bill"
ORDER BY address = ASC
It's in the wrong order
name = "Bill" is wrong
Order by shouldn't have an equals sign
It looks fine
State why a database table should be designed to include a primary key field
So that each record can be uniquely identified
So it can be linked to other tables
Because Access makes you have one
