Databases questions

By Interwoven Maths

Databases question collection

Review Databases questions for Computer Science, with correct answers shown and coverage across tables, records and fields; primary keys; queries and criteria.

Back to Databases practice Back to Computer Science

Question 1

What is a database?
  1. An organised collection of data
  2. A single image file
  3. A computer network cable
  4. A type of antivirus

Question 2

What is a table in a database?
  1. A set of records about one entity type
  2. A backup file type
  3. A list of software licenses
  4. A network topology

Question 3

What is a record in a database table?
  1. Row in a table
  2. Column in a table
  3. Query in SQL
  4. Form in an app

Question 4

What is a field in a database table?
  1. Column in a table
  2. Row in a table
  3. Table relationship
  4. Primary key only

Question 5

What must be true of a primary key?
  1. Unique for each record
  2. The same in every row
  3. A text field only
  4. Optional in all tables

Question 6

What is a foreign key used for?
  1. Link one table to another
  2. Encrypt table data
  3. Sort records alphabetically
  4. Compress a database

Question 7

In SQL, which command retrieves data?
  1. SELECT
  2. UPDATE
  3. DELETE
  4. INSERT

Question 8

In SQL, which clause filters rows?
  1. WHERE
  2. ORDER BY
  3. FROM
  4. JOIN

Question 9

What is ORDER BY used for in SQL?
  1. Sort results
  2. Delete results
  3. Count fields
  4. Create tables

Question 10

What does ASC mean in SQL?
  1. Ascending order
  2. Across all columns
  3. As stored currently
  4. Absolute sort count

Question 11

What does DESC mean in SQL?
  1. Descending order
  2. Default search condition
  3. Delete selected columns
  4. Data entry script command

Question 12

What does COUNT() return in SQL?
  1. Number of matching rows
  2. Largest value only
  3. Average value only
  4. Total number of columns

Question 13

What does SUM() return in SQL?
  1. Total of numeric values
  2. Middle value
  3. Most common text
  4. Number of tables

Question 14

What does AVG() return in SQL?
  1. Mean of numeric values
  2. Median of text values
  3. Highest value only
  4. Count of rows

Question 15

What does AND mean in an SQL condition?
  1. Both conditions must be true
  2. Either condition can be true
  3. No condition is checked
  4. Rows are sorted descending

Question 16

What does OR mean in an SQL condition?
  1. At least one condition must be true
  2. Both conditions must be true
  3. Exactly one condition is true
  4. Only text fields are searched

Question 17

What is INSERT INTO used for in SQL?
  1. Add new records
  2. Remove records
  3. Sort records
  4. Rename fields

Question 18

What is UPDATE used for in SQL?
  1. Change existing records
  2. Create a new database
  3. Delete a table
  4. Count all rows

Question 19

What is DELETE used for in SQL?
  1. Remove records
  2. Add records
  3. Encrypt records
  4. Sort records

Question 20

What does normalisation help to do in a database?
  1. Reduce duplicated data and inconsistency
  2. Increase spelling errors
  3. Remove all keys from tables
  4. Store everything in one giant table

Question 21

In SQL, what does JOIN do?
  1. Combines related rows from multiple tables
  2. Deletes duplicate rows automatically
  3. Encrypts selected columns
  4. Sorts rows into random order

Question 22

In SQL LIKE, what does % mean?
  1. Any sequence of characters
  2. Any single character
  3. Any numeric value only
  4. End of the SQL query

About this topic

Review Databases questions for Computer Science, with correct answers shown and coverage across tables, records and fields; primary keys; queries and criteria.

This topic covers

Example question types