Mark As Completed Discussion

Second Normal Form (2NF)

The table must first be in First Normal Form in order for it to be in Second Normal Form. The second condition is for the table to not have any partial dependency. What this means is that the proper subset of the candidate key determines a non-prime attribute.

Let's use an example to grasp the concept of the Second Normal Form. For this and all following examples, imagine a scenario where one employee can work in multiple departments and every department can have more than one manager. Consider the following table:

Second Normal Form (2NF)
The primary key of this table is actually a composite key EmployeeID, Department. The non-key attribute is Location, which depends solely on the Department. Therefore, this table is currently not in the Seconds Normal Form, so in order to accomplish the normalization, we have to divide it into two parts. The resulting tables would then look like this:

Second Normal Form (2NF)
So, as we can see, the initial partial functional dependency we had is now removed and the Location column is fully dependent on the table’s primary key – Department.