1. 1NF (First Normal Form)
- Goal: Eliminate duplicate data and ensure each column contains atomic values (only one value per column).
- Rules:
- Each column should have unique names.
- Each column should store only one value (no lists or multiple values in a cell).
- All rows must be unique.
- Example:
2. 2NF (Second Normal Form)
- Goal: Eliminate partial dependency (attributes depend on the whole primary key, not just part of it).
- Conditions:
- It must be in 1NF.
- There should be no partial dependency. All non-key attributes must depend on the whole primary key.
- Example:
- Not in 2NF:
(AssumeStudentID
andSubject
are the primary key)
- Not in 2NF:
- Problem: Teacher depends only on the Subject, not on the whole key (
StudentID
+Subject
). In 2NF:
Split the table into two:
3. 3NF (Third Normal Form)
- Goal: Eliminate transitive dependency (non-key attributes should not depend on other non-key attributes).
- Conditions:
- It must be in 2NF.
- There should be no transitive dependency (no non-key attribute should depend on another non-key attribute).
- Example:
- Not in 3NF:
- Problem:
TeacherPhone
depends onTeacher
, butTeacher
is a non-key attribute, which is a transitive dependency. In 3NF:
4. BCNF (Boyce-Codd Normal Form)
- Goal: A stricter version of 3NF. It eliminates any dependency that violates the rule of a key attribute.
- Condition:
- It must be in 3NF.
- For every functional dependency, the left side must be a superkey (an attribute that can uniquely identify a row).
- Example:
- Not in BCNF:
- Problem:
Teacher
→TeacherPhone
, butTeacher
is not a superkey (not enough to identify the row). In BCNF:
Key Differences:
Normal Form | Goal | Key Points |
---|---|---|
1NF | Eliminate duplicate data, single values per column | Unique rows, atomic values |
2NF | Eliminate partial dependency | No partial dependency on primary key |
3NF | Eliminate transitive dependency | No non-key attribute depends on another non-key attribute |
BCNF | Eliminate all functional dependency issues | Left side of dependency must be a superkey |
Quick Tips to Remember:
- 1NF: Atomic values (no lists).
- 2NF: No partial dependency (whole primary key).
- 3NF: No transitive dependency (non-key attributes don’t depend on each other).
- BCNF: Every dependency must have a superkey on the left side.
MCQ
1. Which of the following is the primary goal of First Normal Form (1NF)?
A) Remove partial dependencies
B) Eliminate duplicate data and ensure atomic values
C) Remove transitive dependencies
D) Ensure all non-key attributes depend on the primary key
Answer: B) Eliminate duplicate data and ensure atomic values
2. In Second Normal Form (2NF), which of the following must be true?
A) The table must be in 1NF
B) There should be no partial dependency of attributes on the primary key
C) All non-key attributes must depend on the whole primary key
D) Both A and B
Answer: D) Both A and B
3. Which of the following is a characteristic of Third Normal Form (3NF)?
A) Eliminate transitive dependency
B) All non-key attributes should depend on the primary key only
C) The table must be in 2NF
D) All of the above
Answer: D) All of the above
4. What does BCNF (Boyce-Codd Normal Form) eliminate?
A) Partial dependency
B) Transitive dependency
C) All functional dependencies where the left side is not a superkey
D) Both A and B
Answer: C) All functional dependencies where the left side is not a superkey
5. Which of the following conditions must a table satisfy to be in 1NF?
A) No partial dependency
B) No transitive dependency
C) Each column must contain only atomic values
D) Each table must have a composite key
Answer: C) Each column must contain only atomic values
6. If a table has columns StudentID
, CourseID
, InstructorName
, and InstructorPhone
where StudentID
and CourseID
form the primary key, which form of normalization is violated if InstructorPhone
depends only on InstructorName
?
A) 1NF
B) 2NF
C) 3NF
D) BCNF
Answer: C) 3NF
7. In 2NF, if a table has a composite key, what must be ensured about the non-key attributes?
A) Non-key attributes must depend on only one part of the composite key
B) Non-key attributes must depend on the whole composite key
C) Non-key attributes can be completely independent of the key
D) There should be no non-key attributes in the table
Answer: B) Non-key attributes must depend on the whole composite key
8. A table is in 2NF but not in 3NF if:
A) It contains transitive dependencies
B) It contains partial dependencies
C) It has atomic values in all columns
D) It does not contain any duplicate rows
Answer: A) It contains transitive dependencies
9. Which of the following is true for a table in BCNF?
A) Every non-key attribute depends on the primary key
B) Every determinant is a superkey
C) It must be in 1NF, 2NF, and 3NF
D) Both B and C
Answer: D) Both B and C
10. Which of the following describes a transitive dependency in a database table?
A) A non-key attribute depends on the primary key
B) A non-key attribute depends on another non-key attribute
C) A non-key attribute depends on part of the primary key
D) None of the above
Answer: B) A non-key attribute depends on another non-key attribute
11. Which of the following is the correct order of normal forms?
A) 1NF → 3NF → 2NF → BCNF
B) 1NF → 2NF → 3NF → BCNF
C) BCNF → 2NF → 1NF → 3NF
D) 3NF → 1NF → 2NF → BCNF
Answer: B) 1NF → 2NF → 3NF → BCNF
12. A relation is in 1NF, 2NF, and 3NF but not in BCNF. What could be the possible reason?
A) A non-superkey determines a non-prime attribute
B) A non-prime attribute is dependent on another non-prime attribute
C) A primary key is split across multiple columns
D) All columns are atomic
Answer: A) A non-superkey determines a non-prime attribute
13. What is the key problem with a table that violates 2NF?
A) There are partial dependencies where non-key attributes depend on part of the primary key
B) There are transitive dependencies where non-key attributes depend on other non-key attributes
C) The primary key is too large
D) The table has duplicate rows
Answer: A) There are partial dependencies where non-key attributes depend on part of the primary key
14. Which of the following is a requirement for a table to be in 2NF?
A) The table must be in 1NF
B) All non-key attributes must depend on the whole primary key
C) There must be no transitive dependencies
D) Both A and B
Answer: D) Both A and B
15. Which statement about BCNF is true?
A) BCNF is a stricter version of 3NF
B) BCNF allows transitive dependencies
C) A table in BCNF will always be in 3NF, but not always in 2NF
D) BCNF allows partial dependency
Answer: A) BCNF is a stricter version of 3NF