Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Understanding Databases and SQL Concepts

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which of the following best describes a relational database?

a)

A database that stores all data in a single table

b)

A database that organises data into multiple related tables

c)

A database that stores data in a hierarchical structure

d)

A database that stores data as plain text files

2.

What is a primary key in a database table?

a)

A field that can have duplicate values

b)

A field that uniquely identifies each record in a table

c)

A field used to link two tables together

d)

A field that stores secondary information

3.

Which of the following is an advantage of using a flat file database?

a)

It is easy to set up and manage for small amounts of data

b)

It supports complex relationships between data

c)

It prevents data redundancy automatically

d)

It is highly scalable for large organisations

4.

What is the main purpose of a foreign key in a relational database?

a)

To uniquely identify records within its own table

b)

To enforce referential integrity between tables

c)

To store secondary information

d)

To speed up search queries

5.

Which of the following best describes an entity in entity relationship modelling?

a)

A single value in a table

b)

A real-world object or concept represented in the database

c)

A relationship between two tables

d)

A type of SQL query

6.

Which of the following wildcards is used in SQL with the LIKE command to represent any sequence of characters?

a)

?

b)

%

c)

#

d)

$

7.

Which SQL statement is used to retrieve all records from a table called "Students"?

a)

SELECT * FROM Students;

b)

GET ALL FROM Students;

c)

RETRIEVE * FROM Students;

d)

SHOW ALL FROM Students;

8.

What is a secondary key in a database?

a)

A key that is always unique

b)

A key used for searching and sorting, but not necessarily unique

c)

A key that links two tables together

d)

A key that is never indexed

9.

Which of the following is NOT a feature of a relational database?

a)

Data is stored in tables

b)

Tables can be related using keys

c)

Data is stored in a single, unstructured file

d)

Supports SQL queries

10.

What does SQL stand for?

a)

Structured Query Language

b)

Simple Query Language

c)

Sequential Query Language

d)

Standard Question Language

11.

Which of the following best describes a flat file database?

a)

A database with multiple related tables

b)

A database that stores all data in a single table or file

c)

A database that uses hierarchical relationships

d)

A database that uses object-oriented structures

12.

Which SQL command is used to add a new record to a table?

a)

INSERT INTO

b)

ADD RECORD

c)

NEW ENTRY

d)

APPEND TO

13.

What is the main disadvantage of using a flat file database for large datasets?

a)

It is difficult to set up

b)

It can lead to data redundancy and inconsistency

c)

It supports complex queries

d)

It is highly secure

14.

Which of the following is an example of a primary key?

a)

Student's surname

b)

Student ID number

c)

Student's date of birth

d)

Student's address

15.

Which SQL clause is used to search for a specified pattern in a column?

a)

LIKE

b)

BETWEEN

c)

IN

d)

EXISTS

16.

Which SQL clause is used to filter records based on a specified condition?

a)

WHERE

b)

ORDER BY

c)

GROUP BY

d)

HAVING

17.

What is referential integrity in the context of relational databases?

a)

Ensuring that all data is encrypted

b)

Ensuring that foreign keys in one table correspond to primary keys in another

c)

Ensuring that all tables have the same number of records

d)

Ensuring that all queries are optimised

18.

Which SQL statement would you use to remove all records from a table called "Orders"?

a)

DELETE FROM Orders;

b)

REMOVE ALL FROM Orders;

c)

ERASE Orders;

d)

DROP Orders;

19.

What is the main purpose of an entity relationship diagram (ERD)?

a)

To show the physical layout of a database server

b)

To visually represent the relationships between entities in a database

c)

To display the results of SQL queries

d)

To list all the data types used in a database

20.

Which of the following SQL statements will return only the "Name" and "Age" columns from a table called "People"?

a)

SELECT Name, Age FROM People;

b)

GET Name, Age FROM People;

c)

SHOW Name, Age FROM People;

d)

RETRIEVE Name, Age FROM People;