0% found this document useful (0 votes)
36 views2 pages

3NF-Third Normal Form - NOTES

Third Normal Form (3NF) is achieved from Second Normal Form (2NF) by eliminating transitive dependencies. In the Score table, the columns exam_name and total_marks were identified as dependent on non-prime attributes, necessitating their removal to a new Exam table. This restructuring reduces data duplication and enhances data integrity.

Uploaded by

kbjoash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views2 pages

3NF-Third Normal Form - NOTES

Third Normal Form (3NF) is achieved from Second Normal Form (2NF) by eliminating transitive dependencies. In the Score table, the columns exam_name and total_marks were identified as dependent on non-prime attributes, necessitating their removal to a new Exam table. This restructuring reduces data duplication and enhances data integrity.

Uploaded by

kbjoash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

3NF-Third Normal Form

Third Normal Form is an upgrade from Second Normal Form. When a table is in the Second Normal
Form and has no transitive dependency, then it is in the Third Normal Form. In our last discussion, we
learned about the second normal form and we normalized our Score table into the 2nd Normal Form.
Here, we use the same example, where we have 3 tables, Student, Subject and Score.

Student Table
student_id name reg_no branch address

10 Akon 07-WY CSE Kerala

11 Akon 08-WY IT Gujarat

12 Bkon 09-WY IT Rajasthan

Subject Table
subject_id subject_name teacher

1 Java Java Teacher

2 C++ C++ Teacher

3 Php Php Teacher

Score Table
score_id student_id subject_id marks

1 10 1 70

2 10 2 75

3 11 1 80

NOTE: In the Score table, we need to store some more information, which is the exam name and total
marks, so let's add 2 more columns to the Score table.
score_id student_id subject_id marks exam_name total_marks

Requirements for Third Normal Form


For a table to be in the third normal form,
1. It should be in the Second Normal form.
2. And it should not have Transitive Dependency.
What is Transitive Dependency? With exam_name and total_marks added to our Score table, it saves
more data now. Primary key for our Score table is a composite key, which means it's made up of two
attributes or columns → student_id + subject_id.
Our new column exam_name depends on both student and subject. For example, a mechanical
engineering student will have Workshop exam but a computer science student won't. And for some
subjects you have Practical exams and for some you don't. So we can say that exam_name is dependent
on both student_id and subject_id.
What about our second new column total_marks? Does it depend on our Score table's primary key?
Well, the column total_marks depends on exam_name as with exam type the total score changes. For
example, practicals are of fewer marks while theory exams are of more marks. But, exam_name is just
another column in the score table. It is not a primary key or even a part of the primary key, and
total_marks depends on it. This is referred to as Transitive Dependency, - a situation where a non-prime
attribute depends on other non-prime attributes rather than depending upon the prime attributes or
primary key.

SOLUTION: - How to remove Transitive Dependency: Take out the columns exam_name and
total_marks from Score table and put them in an Exam table and use the exam_id wherever required!

Score Table: In 3rd Normal Form


score_id student_id subject_id marks exam_id

The new Exam table


exam_id exam_name total_marks

1 Workshop 200

2 Mains 70

3 Practicals 30

The advantage of removing transitive dependency is,


 Amount of data duplication is reduced.
 Data integrity achieved.

TASK: Transform ALL your 2NF relations into 3NF

You might also like