DBMS – Normalization & Dependencies (Solutions)
Q1. Define Functional Dependency with an example. (2 Marks)
A Functional Dependency (FD) is a relationship between two attributes in a relation. It
means if attribute A uniquely determines attribute B, then B is functionally dependent on A.
Notation: A → B
Example: In the relation STUDENT(RollNo, Name, Course)
→ RollNo → Name, Course
Q2. Explain the role of normalization in database design. (3–4 Marks)
Normalization is the process of organizing data in a database to reduce redundancy and
improve data integrity. It ensures data is stored efficiently by dividing large tables into
smaller, related tables.
Roles:
1. Eliminates data redundancy.
2. Ensures logical data consistency.
3. Simplifies data maintenance and updates.
4. Enhances query performance by maintaining clear relationships.
Q3. Differentiate between 2NF and 3NF. (4 Marks)
Aspect 2NF 3NF
Definition Removes partial Removes transitive
dependencies dependencies
Dependency Type Non-prime attributes Non-prime attributes
depend on part of candidate depend on non-key
key attributes
Example If RollNo, Course → Marks, If RollNo → DeptNo and
but RollNo → Name DeptNo → DeptName
Objective Eliminate partial Eliminate transitive
dependency dependency
Q4. Define Multivalued Dependency with an example. (2 Marks)
A Multivalued Dependency (MVD) occurs when one attribute in a table uniquely determines
another attribute independently of all other attributes.
Notation: A →→ B
Example: In a relation STUDENT(RollNo, Hobby, Language), if RollNo →→ Hobby and RollNo
→→ Language, it means hobbies and languages are independent multivalued facts about a
student.
Q5. What is a Join Dependency? (2 Marks)
A Join Dependency (JD) occurs when a relation can be reconstructed (joined) from its
projections (smaller relations) without loss of information.
Example: R(A, B, C) has JD if R = πA,B(R) ππB,C(R) ⨝ π A,C(R).
Q6. List different types of Normal Forms and their conditions. (5 Marks)
Normal Form Condition / Rule
1NF No repeating groups or arrays; atomic
values only
2NF Must be in 1NF and no partial dependency
3NF Must be in 2NF and no transitive
dependency
BCNF For every FD X → Y, X should be a super key
4NF Must be in BCNF and no multivalued
dependency
5NF Must be in 4NF and no join dependency
Q7. Explain BCNF with a diagram. (6 Marks)
Boyce-Codd Normal Form (BCNF): A relation is in BCNF if, for every functional dependency
X → Y, X is a super key. BCNF handles anomalies not covered by 3NF.
Example:
R(Teacher, Subject, Dept)
FDs: Teacher → Dept, (Teacher, Subject) → Dept
Here, Teacher is not a superkey → violates BCNF.
BCNF Decomposition:
R1(Teacher, Dept), R2(Teacher, Subject)
Diagram:
[Teacher, Subject, Dept]
|
| Decompose into
↓
[Teacher, Dept] [Teacher, Subject]
Q8. Write SQL statements to normalize STUDENT table into 3NF. (6 Marks)
Initial Table: STUDENT(RollNo, Name, Course, DeptName, HOD)
Functional Dependencies:
RollNo → Name, Course, DeptName, HOD
DeptName → HOD
Steps:
1. First Normal Form (1NF): Ensure atomic values. (Already atomic)
2. Second Normal Form (2NF): No partial dependency. (RollNo is PK — already OK)
3. Third Normal Form (3NF): Remove transitive dependency (DeptName → HOD).
Decompose:
- STUDENT(RollNo, Name, Course, DeptName)
- DEPARTMENT(DeptName, HOD)
SQL Implementation:
CREATE TABLE DEPARTMENT (
DeptName VARCHAR(50) PRIMARY KEY,
HOD VARCHAR(50)
);
CREATE TABLE STUDENT (
RollNo INT PRIMARY KEY,
Name VARCHAR(50),
Course VARCHAR(50),
DeptName VARCHAR(50),
FOREIGN KEY (DeptName) REFERENCES DEPARTMENT(DeptName)
);
Q9. Explain why normalization is important for data integrity. (4 Marks)
Normalization maintains data integrity by:
1. Eliminating redundancy: prevents anomalies during insert/update/delete.
2. Ensuring consistency: each data item is stored only once.
3. Maintaining referential integrity: uses keys and foreign keys properly.
4. Improving reliability: changes in one table don’t affect others.
Q10. Illustrate the difference between Functional and Multivalued
Dependencies. (4 Marks)
Aspect Functional Dependency Multivalued Dependency
(FD) (MVD)
Definition One attribute uniquely One attribute determines a
determines another set of independent
attributes
Notation A→B A →→ B
Example RollNo → Name RollNo →→ Hobby
Used in Up to BCNF 4NF normalization
✅ Total Marks (approx): 43 marks
(Good set for Unit-3 or Unit-4 exam in Amity DBMS syllabus)