NEW
Font size
S
M
L
XL
WorksheetsSQL & Robust Programs
Total questions: 21
Worksheet time: 11mins
Name
Class
Date
1.
What does SQL stand for?
a)
Structured Query Language
b)
Structured Question Language
c)
Strong Question Language
d)
Strong Query Language
2.
Which SQL statement is used to extract data from a database?
a)
OPEN
b)
GET
c)
EXTRACT
d)
SELECT
3.
Which SQL statement is used to update data in a database?
a)
MODIFY
b)
SAVE AS
c)
UPDATE
d)
SAVE
4.
Which SQL statement is used to insert new data in a database?
a)
ADD NEW
b)
ADD RECORD
c)
INSERT NEW
d)
INSERT INTO
5.
With SQL, how do you select all the columns from a table named "Persons"?
a)
SELECT [all] FROM Persons
b)
SELECT *.Persons
c)
SELECT * FROM Persons
d)
SELECT Persons
6.
With SQL, how can you insert a new record into the "Persons" table?
a)
INSERT INTO Persons VALUES ('Ahmed');
b)
INSERT VALUES ('Ahmed') INTO Persons;
c)
INSERT ('Ahmed') INTO Persons;
d)
INSERT VALUES INTO ('AHMED');
7.
Which of these is not a method for ensuring a program is robust? (1-4)
a)
Keeping passwords safe
b)
Data Validation
c)
Authentication
d)
Data Sanitisation
8.
Why is code indented? (1-4)
a)
To group together a function
b)
The code does not use a { syntax and indentation is used instead
c)
To make it easier to read
d)
All of the above
9.
What is data validation? (1-4)
a)
Checking that the data entered is wrong
b)
Checking that the data entered is correct
c)
Checking that the data entered is sensible or reasonable
10.
Which is these IS NOT an example of validation (1-4)
a)
Checking the number entered is 2 digits
b)
Asking a user to enter the same data in twice
c)
Use of a Lookup table
d)
Use of a presence check
11.
What does a range check do? (1-4)
a)
Checks data across a range of numbers
b)
Checks the data is within an acceptable range
c)
Where three types of data are used
d)
Checks that the data is in the correct format
12.
Which of these is not a method for authenticating a user? (4-6)
a)
Password
b)
Password and Username
c)
Finger print scanner
d)
Encryption
13.
Why are comments used in a program? (4-6)
a)
It is required to make the program run
b)
Comments pad out the program and make it look more professional
c)
To keep the user aware of any program errors and issues.
d)
To help security in the code
14.
What is defensive programming design? (4-6)
a)
Making your code / program error free
b)
Creating code that is easy to use and understand
c)
A method of ensuring that your code is not misused
d)
Code where the data is validated
15.
When is terminal testing carried out?
a)
Before you start
b)
At the end
c)
During the project
d)
After the design section
16.
When is a runtime error identified?
a)
After the program is executed
b)
Before a program runs
c)
While the program runs
17.
What is iterative testing?
a)
Testing completed after an error is found
b)
Random tests on a computer program
c)
Test completed as the program is being coded
d)
Test which are planned
18.
What is the purpose of testing?
a)
To identify errors
b)
To identify issues that may occur when a customer uses the program
c)
To test the security of the program
d)
All of the above
19.
What word is missing from the line below?
SELECT *
_______ CUSTOMER;
SELECT *
_______ CUSTOMER;
a)
FROM
b)
WHERE
c)
SELECT
d)
ORDER BY
20.
What is the purpose of *?
a)
Selects ALL fields from the table
b)
Selects only the first field in the table
c)
Selects the last field in the table
d)
Shows only the first row in the table
21.
To find the total value of sales, use which?
a)
SUM
b)
COUNT
c)
MAX
d)
MIN
Reset
