1. Which SQL clause is used to filter records after an aggregate function has been applied?
A. WHERE
B. ORDER BY
C. GROUP BY
D. HAVING
Answer: D
Rationale: The HAVING clause is used to filter records after they have been grouped by the
GROUP BY clause and aggregate functions have been applied. WHERE filters rows before
grouping.
2. A table is in First Normal Form (1NF). What is the requirement to move it to Second Normal
Form (2NF)?
A. Remove all transitive dependencies.
B. Ensure all non-key attributes are fully functionally dependent on the primary key.
C. Eliminate repeating groups.
D. Define all foreign keys.
Answer: B
,Rationale: To achieve 2NF, a table must be in 1NF and all non-key attributes must be fully
dependent on the entire primary key, meaning partial dependencies on a composite key
must be removed.
3. Which type of JOIN returns all records when there is a match in either the left or the right
table?
A. FULL OUTER JOIN
B. LEFT JOIN
C. RIGHT JOIN
D. INNER JOIN
Answer: A
Rationale: A FULL OUTER JOIN returns all records from both tables, matching them where
possible and filling in NULLs where there is no match.
4. Which SQL command is used to add a new column to an existing table?
A. ALTER TABLE
B. MODIFY TABLE
C. UPDATE TABLE
D. INSERT INTO
Answer: A
, Rationale: The ALTER TABLE command is used to add, delete, or modify columns in an
existing table structure.
5. In a Crow’s Foot ERD, what does a dashed line between two entities represent?
A. A non-identifying relationship
B. An identifying relationship
C. A strong relationship
D. A mandatory relationship
Answer: A
Rationale: A dashed line indicates a non-identifying relationship, where the child entity
can exist independently of the parent and the parent’s primary key is not part of the child’s
primary key.
6. Which normal form deals with removing transitive dependencies?
A. 1NF
B. 2NF
C. 3NF
D. BCNF
Answer: C
Rationale: Third Normal Form (3NF) requires a table to be in 2NF and have no transitive
dependencies, meaning non-key attributes must not depend on other non-key attributes.