All featured quizzes

Database - Basics

Database definitions, transactions, table structures, columns, and data manipulation statements.

Sample Questions

A preview of what's in this quiz. Answer them interactively for instant scoring and full explanations.

What is a database?

1. What is a database?

  • A.An organized collection of structured data stored electronically
  • B.A hardware device used to print documents
  • C.A software application for compiling source code
  • D.A network protocol for sending email messages
Which SQL statement is used to retrieve data from a database?

2. Which SQL statement is used to retrieve data from a database?

  • A.SELECT
  • B.GET
  • C.RETRIEVE
  • D.FETCH
What is a relational database?

3. What is a relational database?

  • A.A database that stores data in tables linked by relationships
  • B.A database that stores files in nested directories
  • C.A database that uses graph structures exclusively
  • D.A temporary cache store residing entirely in memory
Which SQL statement is used to delete records from a table?

4. Which SQL statement is used to delete records from a table?

  • A.DELETE
  • B.REMOVE
  • C.DROP
  • D.TRUNCATE
Which SQL aggregation function is used to calculate the total number of rows matching a query criteria?

5. Which SQL aggregation function is used to calculate the total number of rows matching a query criteria?

  • A.COUNT()
  • B.SUM()
  • C.TOTAL()
  • D.ADD()
What is a Primary Key?

6. What is a Primary Key?

  • A.A field that uniquely identifies each record in a table
  • B.A field used to encrypt the database contents
  • C.A field that links two databases over a network
  • D.A field that is generated temporarily during query execution
What is a Foreign Key?

7. What is a Foreign Key?

  • A.A field in one table that references the primary key of another table
  • B.A key used by external developers to log into the database
  • C.A key that uniquely identifies rows in NoSQL databases only
  • D.A backup file key for database restoration
Which SQL statement is used to modify existing records in a table?

8. Which SQL statement is used to modify existing records in a table?

  • A.UPDATE
  • B.MODIFY
  • C.CHANGE
  • D.ALTER
In a relational database table, what does a row represent?

9. In a relational database table, what does a row represent?

  • A.A single record or data entry
  • B.A specific attribute or data type
  • C.A list of all unique tables
  • D.A query logic container
Which SQL clause is used to filter records based on a specified condition?

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

  • A.WHERE
  • B.FILTER
  • C.HAVING
  • D.WHEN
In a relational database table, what does a column represent?

11. In a relational database table, what does a column represent?

  • A.A specific attribute or field shared by all records
  • B.A single data row or record
  • C.A connection to a different database
  • D.An index for sorting tables
What is the difference between an INNER JOIN and a LEFT JOIN?

12. What is the difference between an INNER JOIN and a LEFT JOIN?

  • A.INNER JOIN returns only matching rows; LEFT JOIN returns all rows from the left table and matching rows from the right.
  • B.LEFT JOIN returns only matching rows; INNER JOIN returns all rows from the left table.
  • C.INNER JOIN returns all rows from both tables; LEFT JOIN returns only left-side columns.
  • D.INNER JOIN works on SQL databases; LEFT JOIN only works on NoSQL systems.
What is a Join in SQL?

13. What is a Join in SQL?

  • A.An operation used to combine rows from two or more tables based on a related column
  • B.An operation that merges two separate database servers
  • C.A method to append one table's rows directly onto another without mapping
  • D.A compiler function that links SQL queries to backend server code
Which operator is used to search for NULL values in SQL?

14. Which operator is used to search for NULL values in SQL?

  • A.IS NULL
  • B.= NULL
  • C.== NULL
  • D.LIKE NULL
Which SQL Join returns all records when there is a match in either the left or right table?

15. Which SQL Join returns all records when there is a match in either the left or right table?

  • A.FULL JOIN
  • B.INNER JOIN
  • C.LEFT JOIN
  • D.RIGHT JOIN
What is the purpose of the GROUP BY clause in SQL?

16. What is the purpose of the GROUP BY clause in SQL?

  • A.To arrange identical data into groups, typically for aggregate calculations
  • B.To sort the query output records in alphabetical order
  • C.To filter rows before they are processed by the query
  • D.To join two or more tables together
What does a NULL value represent in a database?

17. What does a NULL value represent in a database?

  • A.Missing, unknown, or non-applicable data
  • B.A value of zero
  • C.An empty text string
  • D.An active database error indicator
What is SQL?

18. What is SQL?

  • A.Structured Query Language
  • B.Sequential Query Logical
  • C.Simple Query List
  • D.System Queue Language
What is the default sorting order when using the ORDER BY clause without specifying a direction?

19. What is the default sorting order when using the ORDER BY clause without specifying a direction?

  • A.Ascending
  • B.Descending
  • C.Random
  • D.Alphabetical by column name only
Which SQL statement is used to add new records to a database table?

20. Which SQL statement is used to add new records to a database table?

  • A.INSERT INTO
  • B.ADD ROW
  • C.UPDATE INTO
  • D.CREATE RECORD

Looking for a different topic? Browse all subjects