What is the main goal of Third Normal Form (3NF) in database design?
The main goal of 3NF is to remove transitive dependencies, ensuring that non-key columns depend only on the primary key, which helps avoid data duplication and update anomalies.
Click to reveal answer
intermediate
Define transitive dependency in the context of 3NF.
A transitive dependency occurs when a non-key column depends on another non-key column, which in turn depends on the primary key. 3NF removes these to keep data consistent.
Click to reveal answer
beginner
Which of the following must a table satisfy to be in Third Normal Form (3NF)? 1. Be in Second Normal Form (2NF) 2. No transitive dependencies
A table must be in 2NF and have no transitive dependencies to be in 3NF. This means every non-key attribute depends only on the primary key.
Click to reveal answer
intermediate
Given a table with columns: StudentID (PK), StudentName, AdvisorID, AdvisorName. Why is this table not in 3NF?
Because AdvisorName depends on AdvisorID, which is not the primary key. This is a transitive dependency. To reach 3NF, Advisor info should be in a separate table.
Click to reveal answer
beginner
How does 3NF improve database maintenance?
3NF reduces data duplication and inconsistencies by ensuring each fact is stored only once. This makes updates easier and prevents errors.
Click to reveal answer
Which condition must be true for a table to be in Third Normal Form (3NF)?
AIt has no transitive dependencies
BIt has no partial dependencies
CIt has duplicate rows
DIt contains only one column
✗ Incorrect
3NF requires that no non-key column depends on another non-key column, meaning no transitive dependencies.
What is a transitive dependency?
AA non-key column depends on another non-key column
BA primary key depends on a foreign key
CA column depends on itself
DA table has duplicate rows
✗ Incorrect
A transitive dependency means a non-key column depends on another non-key column, which violates 3NF.
If a table is in 2NF but has transitive dependencies, what is its normalization status?
AIt is in Boyce-Codd Normal Form
BIt is in 3NF
CIt is in 1NF
DIt is not in 3NF
✗ Incorrect
3NF requires no transitive dependencies, so the table is not in 3NF if they exist.
Which action helps achieve 3NF?
ACombining unrelated data into one table
BAdding redundant columns
CSplitting tables to remove transitive dependencies
DIgnoring primary keys
✗ Incorrect
Splitting tables to separate dependent data removes transitive dependencies and achieves 3NF.
Why is 3NF important in databases?
ATo increase the number of tables
BTo reduce data duplication and improve data integrity
CTo make queries slower
DTo store data in one big table
✗ Incorrect
3NF reduces duplication and keeps data consistent, making databases easier to maintain.
Explain Third Normal Form (3NF) and why it is important in database design.
Think about how 3NF helps keep data clean and easy to update.
You got /4 concepts.
Describe a real-life example where a table violates 3NF and how you would fix it.
Consider a table with people and their managers' names stored together.
You got /3 concepts.
Practice
(1/5)
1. Which of the following best describes Third Normal Form (3NF) in database design?
easy
A. Every non-key column depends only on the primary key.
B. Tables must have no more than three columns.
C. All columns must be unique across the table.
D. Data must be stored in a single table without duplicates.
Solution
Step 1: Understand 3NF definition
3NF requires that non-key columns depend only on the primary key, not on other non-key columns.
Step 2: Evaluate options
Every non-key column depends only on the primary key. correctly states this. The other options are incorrect descriptions of 3NF.
Final Answer:
Every non-key column depends only on the primary key. -> Option A
Quick Check:
3NF = Non-key columns depend only on primary key [OK]
Hint: 3NF means no column depends on non-key columns [OK]
Common Mistakes:
Confusing 3NF with limiting number of columns
Thinking all columns must be unique
Believing 3NF means one big table
2. Which SQL statement correctly creates a table that follows Third Normal Form (3NF)?
easy
A. CREATE TABLE Orders (OrderID INT PRIMARY KEY, CustomerID INT, CustomerName VARCHAR(50));
B. CREATE TABLE Orders (OrderID INT PRIMARY KEY, CustomerName VARCHAR(50), CustomerAddress VARCHAR(100));
C. CREATE TABLE Orders (OrderID INT PRIMARY KEY, CustomerID INT); CREATE TABLE Customers (CustomerID INT PRIMARY KEY, CustomerName VARCHAR(50));
D. CREATE TABLE Orders (OrderID INT, CustomerName VARCHAR(50));
Solution
Step 1: Identify 3NF compliance in table design
3NF requires separating data so non-key columns do not depend on other non-key columns. CustomerName depends on CustomerID, so it should be in a separate table.
Step 2: Analyze options
CREATE TABLE Orders (OrderID INT PRIMARY KEY, CustomerID INT); CREATE TABLE Customers (CustomerID INT PRIMARY KEY, CustomerName VARCHAR(50)); splits Orders and Customers, following 3NF. CREATE TABLE Orders (OrderID INT PRIMARY KEY, CustomerID INT, CustomerName VARCHAR(50)); stores CustomerName in Orders, violating 3NF. The other options miss primary keys or mix data improperly.
Final Answer:
CREATE TABLE Orders (OrderID INT PRIMARY KEY, CustomerID INT); CREATE TABLE Customers (CustomerID INT PRIMARY KEY, CustomerName VARCHAR(50)); -> Option C
Quick Check:
Separate related data into tables = 3NF [OK]
Hint: Split tables to avoid non-key dependencies [OK]
Common Mistakes:
Putting dependent data in the same table
Missing primary keys
Ignoring data duplication issues
3. Given the table below, which is NOT in Third Normal Form (3NF)?
EmployeeID | EmployeeName | Department | DepartmentHead
What is the main reason this table violates 3NF?
medium
A. DepartmentHead depends on Department, not EmployeeID.
B. EmployeeName depends on EmployeeID.
C. EmployeeID is not unique.
D. Department is a primary key.
Solution
Step 1: Identify dependencies in the table
DepartmentHead depends on Department, which is a non-key column, not on the primary key EmployeeID.
Step 2: Check 3NF rules
3NF requires no non-key column depends on another non-key column. Here, DepartmentHead depends on Department, violating 3NF.
Final Answer:
DepartmentHead depends on Department, not EmployeeID. -> Option A
Quick Check:
Non-key depends on non-key = violates 3NF [OK]
Hint: Check if non-key columns depend on other non-key columns [OK]
Common Mistakes:
Thinking EmployeeName dependency breaks 3NF
Assuming EmployeeID is not unique
Confusing primary key with foreign key
4. You have a table:
StudentID | StudentName | Advisor | AdvisorOffice
This table violates 3NF. What is the best way to fix it?
medium
A. Remove AdvisorOffice column.
B. Create a separate Advisor table with Advisor and AdvisorOffice.
C. Make StudentName the primary key.
D. Add AdvisorOffice to StudentID as a foreign key.
Solution
Step 1: Identify the 3NF violation
AdvisorOffice depends on Advisor, a non-key column, causing a transitive dependency violating 3NF.
Step 2: Fix by separating dependent data
Creating a separate Advisor table with Advisor and AdvisorOffice removes the transitive dependency.
Final Answer:
Create a separate Advisor table with Advisor and AdvisorOffice. -> Option B
Quick Check:
Separate dependent data into own table to fix 3NF [OK]
Hint: Fix 3NF by splitting tables for transitive dependencies [OK]