Pre-Assessment 2025 [Actual Test] Verified
Questions & Answers | Guaranteed A+
Question 1: Which SQL clause is used to remove duplicate rows from a result set in PostgreSQL?
A) DISTINCT
B) UNIQUE
C) NO DUPLICATE
D) SORTED
Correct Answer: A) DISTINCT
Explanation: The DISTINCT keyword eliminates duplicate rows from query results. UNIQUE is a
constraint used in table definitions, not in SELECT statements.
Question 2: A table ‘employee’ has a composite primary key (dept_id, emp_num). Which statement
is true?
A) Either column may contain nulls
B) Neither column may contain nulls
C) Only dept_id may contain nulls
D) Only emp_num may contain nulls
Correct Answer: B) Neither column may contain nulls
Explanation: Primary-key columns—composite or simple—must be NOT NULL to guarantee
uniqueness and identifiability of every row.
Question 3: In MySQL, a BEFORE INSERT trigger cannot:
A) Modify the values being inserted
B) Call stored procedures
C) Create tables
, D) Reference OLD values
Correct Answer: D) Reference OLD values
Explanation: BEFORE INSERT triggers have no OLD pseudo-row because the row does not yet
exist in the table; only NEW values are accessible.
Question 4: Which normal form requires that every non-key attribute be fully functionally
dependent on the entire primary key?
A) 1NF
B) 2NF
C) 3NF
D) BCNF
Correct Answer: B) 2NF
Explanation: Second normal form (2NF) eliminates partial dependencies; every non-key attribute
must depend on the whole composite key, not just part of it.
Question 5: The ACID property “Isolation” is most closely associated with which concurrency
problem?
A) Lost update
B) Deadlock
C) Dirty read
D) Cascading revoke
Correct Answer: C) Dirty read
Explanation: Isolation ensures that one transaction cannot read uncommitted (dirty) changes made
by another; dirty reads violate isolation.
Question 6: Which PostgreSQL command rewrites the table and removes obsolete tuples while
reclaiming disk space?
A) DELETE
B) TRUNCATE
C) VACUUM FULL
D) DROP