eurocec ebusiness innovations web services





  European Centre of e-Commerce & Publishing


29/12/20

SQL | MySQL Programming | Using MySQL with PHP | Authentication Login System | Content Management System | MySQL 5 Installation |


SQL / Creating the Database Schema


The Third Normal Form - 3NF



In order to put a table in the third normal form - 3NF, we must first put it in second normal form 2NF, and after this to remove all transitive dependencies which may exist among its fields.


Thus, in this stage of normalization no attributes depend on other non-key attributes.
In the second normal form the attributes of a table must depend on the whole key. In the third normal the attributes of a table must depend on nothing but the key.

So what is a transitive dependency?

A functional dependency A B is called transitive when there is a field C which is not part of primary key of the table, such as:

C=C(A) and B=B(C)

In order to remove these dependencies we work as earlier breaking the tables that contain them into others without transitive dependencies until the new tables achieve the 3NF.

Look at the following employees_master table.



In this table we have a transitive dependency between Zip field and City and State fields - what ever that means since a zip tells us what state and what city an address is in.
Therefore, to make this table in third normal form we need to split out City, State and Zip fields into a table of there own and then just have the zip in the employee table:

Thus, the initial employees _master table will be broken in two tables that will be associated as in the following figure.









Copyright © euRoCec.eu

The content and services of eurocec.eu are offered under the terms of use which the visitors have accepted.


Sectors: Publishing, e-Business Development, Financial and Investment Consulting, Web Services, WebSite Management, WebSite Optimization, Search Engines Optimization, Web Business Plans, Email Marketing.