The second step in Normalization is 2NF.
A table is in 2NF, only if a relation is in 1NF and meet all the rules, and every non-key attribute is fully dependent on primary key.
The Second Normal Form eliminates partial dependencies on primary keys.
Let us see an example −
In the above table, we have partial dependency; let us see how −
The prime key attributes are StudentID and ProjectID.
As stated, the non-prime attributes i.e. StudentName and ProjectName should be functionally dependent on part of a candidate key, to be Partial Dependent.
The StudentName can be determined by StudentID, which makes the relation Partial Dependent.
The ProjectName can be determined by ProjectID, which makes the relation Partial Dependent.
Therefore, the <StudentProject> relation violates the 2NF in Normalization and is considered a bad database design.
To remove Partial Dependency and violation on 2NF, decompose the above tables −
Now the relation is in 2nd Normal form of Database Normalization