WGU D186 Task 3 Mastery - Database Management Foundations 2026
1. Which SQL command is used to remove all records from a table without
deleting the table structure itself?
A. DELETE
B. DROP
C. TRUNCATE
D. REMOVE
Answer: C
Rationale: TRUNCATE removes all rows from a table, but the table structure and its
columns, constraints, and indexes remain intact. DELETE is DML and can be filtered, while
DROP removes the table entirely.
2. In a relational database, what does a ‘Foreign Key’ represent?
A. A unique identifier for every record in the table
B. A column that cannot contain null values
C. An attribute that creates a link between data in two tables
D. An index used to speed up data retrieval
Answer: C
Rationale: A Foreign Key is a field in one table that refers to the Primary Key in another
table, establishing a relationship between them.
,3. Which Normal Form requires that all non-key attributes are fully functional
dependent on the primary key, effectively removing partial dependencies?
A. Second Normal Form (2NF)
B. First Normal Form (1NF)
C. Third Normal Form (3NF)
D. Boyce-Codd Normal Form (BCNF)
Answer: A
Rationale: Second Normal Form (2NF) requires that the table is in 1NF and that no non-
prime attribute is dependent on any proper subset of any candidate key (partial
dependency).
4. What is the purpose of the SQL ‘GROUP BY’ clause?
A. To sort the result set in ascending or descending order
B. To filter rows based on a specific condition before aggregation
C. To arrange identical data into groups, often used with aggregate functions
D. To join two tables based on a common column
Answer: C
Rationale: GROUP BY is used to group rows that have the same values into summary rows,
like finding the sum or average for each group.
5. Which of the following is an example of a Data Definition Language (DDL)
command?
A. SELECT
B. UPDATE
C. INSERT
D. CREATE
Answer: D
Rationale: DDL commands like CREATE, ALTER, and DROP are used to define or modify
the database schema structure.
, 6. Which operator is used in a WHERE clause to search for a specified pattern in
a column?
A. IN
B. MATCH
C. LIKE
D. BETWEEN
Answer: C
Rationale: The LIKE operator is used in a WHERE clause to search for a specified pattern
in a column, often using wildcards like % or _.
7. In the context of database transactions, what does ‘Atomicity’ mean?
A. The transaction ensures data is consistent before and after execution
B. Transactions are processed independently of each other
C. The results of a committed transaction are permanent
D. A transaction is treated as a single unit, which either succeeds completely or fails completely
Answer: D
Rationale: Atomicity ensures that all operations within a transaction are completed; if any
part fails, the entire transaction is rolled back.
8. What is the primary difference between the ‘WHERE’ clause and the ‘HAVING’
clause?
A. WHERE is used with SELECT, HAVING is used with UPDATE
B. HAVING is used for string patterns, WHERE is used for numerical values
C. WHERE filters rows before grouping, while HAVING filters groups after the GROUP BY clause
D. There is no difference; they are interchangeable
Answer: C
Rationale: WHERE filters individual records. HAVING is used specifically to filter the
results of a GROUP BY operation.
1. Which SQL command is used to remove all records from a table without
deleting the table structure itself?
A. DELETE
B. DROP
C. TRUNCATE
D. REMOVE
Answer: C
Rationale: TRUNCATE removes all rows from a table, but the table structure and its
columns, constraints, and indexes remain intact. DELETE is DML and can be filtered, while
DROP removes the table entirely.
2. In a relational database, what does a ‘Foreign Key’ represent?
A. A unique identifier for every record in the table
B. A column that cannot contain null values
C. An attribute that creates a link between data in two tables
D. An index used to speed up data retrieval
Answer: C
Rationale: A Foreign Key is a field in one table that refers to the Primary Key in another
table, establishing a relationship between them.
,3. Which Normal Form requires that all non-key attributes are fully functional
dependent on the primary key, effectively removing partial dependencies?
A. Second Normal Form (2NF)
B. First Normal Form (1NF)
C. Third Normal Form (3NF)
D. Boyce-Codd Normal Form (BCNF)
Answer: A
Rationale: Second Normal Form (2NF) requires that the table is in 1NF and that no non-
prime attribute is dependent on any proper subset of any candidate key (partial
dependency).
4. What is the purpose of the SQL ‘GROUP BY’ clause?
A. To sort the result set in ascending or descending order
B. To filter rows based on a specific condition before aggregation
C. To arrange identical data into groups, often used with aggregate functions
D. To join two tables based on a common column
Answer: C
Rationale: GROUP BY is used to group rows that have the same values into summary rows,
like finding the sum or average for each group.
5. Which of the following is an example of a Data Definition Language (DDL)
command?
A. SELECT
B. UPDATE
C. INSERT
D. CREATE
Answer: D
Rationale: DDL commands like CREATE, ALTER, and DROP are used to define or modify
the database schema structure.
, 6. Which operator is used in a WHERE clause to search for a specified pattern in
a column?
A. IN
B. MATCH
C. LIKE
D. BETWEEN
Answer: C
Rationale: The LIKE operator is used in a WHERE clause to search for a specified pattern
in a column, often using wildcards like % or _.
7. In the context of database transactions, what does ‘Atomicity’ mean?
A. The transaction ensures data is consistent before and after execution
B. Transactions are processed independently of each other
C. The results of a committed transaction are permanent
D. A transaction is treated as a single unit, which either succeeds completely or fails completely
Answer: D
Rationale: Atomicity ensures that all operations within a transaction are completed; if any
part fails, the entire transaction is rolled back.
8. What is the primary difference between the ‘WHERE’ clause and the ‘HAVING’
clause?
A. WHERE is used with SELECT, HAVING is used with UPDATE
B. HAVING is used for string patterns, WHERE is used for numerical values
C. WHERE filters rows before grouping, while HAVING filters groups after the GROUP BY clause
D. There is no difference; they are interchangeable
Answer: C
Rationale: WHERE filters individual records. HAVING is used specifically to filter the
results of a GROUP BY operation.