Chapter 4 – How to know Relation in 2NF or 3NF?

First, we need to know about dependencies

1. Functional Dependencies
-Dependency can be understand as one/more attributes depend on other one/more attributes
Example:
studentid –> (studentname, dob)
(semesterid, courseid) –> coursefee

1.1 Functional Dependency (FD):
This is the dependency of non-key attributes to key attributes
+If non-key attributes depend on the whole key PK(attr1, attr2), this is fully functional dependency
+If non-key attributes depend on partial key attr1 of PK(attr1, attr2), this is partial functional dependency
1.2 Transitive Dependency (TD):
This is the dependency of non-key attributes to non-key attributes

2. How to know Relation in 2NF?
-If the relation still has Functional Dependency (FD) –> It is NOT in 2NF, it is in 1NF
-We need to clear all the FD to make the relation in 2NF
-The splitting rules are:
+According to each FD –> Take the attributes and its dependent key(s) to form a new relation –> Remove the attributes from ORIGIN relation –> But, keep key attribute(s) remain in the ORIGIN relation

3. How to know Relation in 3NF?
-If the relation still has Transitive Dependency (TD) –> It is NOT in 3NF –> It is MAYBE in 2NF
-To clear the TD, we need to follow rules as:
+According to each TD –> Take the attributes and its dependent attributes to form a new relation –> If, there is no other attributes depend on these attributes, then Remove the attributes from ORIGIN relation –> If any attributes still have dependency, keep them remain in the ORIGIN relation

Add Comment