Page 26 - Database-En-V3
P. 26
III. Normalization rules
Normalization forms are most useful after you have represented all the data elements
and arrived at an initial design. This idea helps you make sure that you have divided
data elements into the appropriate tables.
Apply the rules sequentially, making sure at each step that the design reaches what is
called a normal form. There are five forms that are accepted and applied; from the
first normal form (1NF) to the fifth normal form (5NF). In most applications, it is often
applied up to the third rule to reach the standard design, and rarely beyond that.
1. FIRST NORMAL FORM – 1NF
First normal form shows that at each intersection of column and row in the table (cell),
there is a single value and not a list of values. For example, it is not possible to enter
more than one phone in a field called Guardian's Phone. If you think of each
intersection of rows and columns as a cell, each cell can only hold one value.
2. SECOND NORMAL FORM - 2NF
Second normal form requires that each non-key column be completely dependent on
the primary key, not just part of it. This rule applies when you have a primary key
consisting of more than one column. For example, let's say you have a table that
contains the following columns, student ID (primary key), course ID (primary key),
course type, and course degree. Note that course type depends only on course ID,
while course degree depend on both course ID and student ID
3. THIRD NORMAL FORM – 3NF
Third Normal Form requires not only that each non-key column be dependent on the
entire primary key, but that the non-key columns be independent on each other.
Another way to say this is that every non-keyed column must depend on the primary
key and nothing else. For example, assume you have a table that contains the
following columns: Course ID (primary key), course Name, Department, teacher
course and email teacher. Email teacher is related to teacher course, not belong to
course description. The solution is, separate this table to three tables; course, teaching
and teacher. Course table contains course ID, name, and department. Teacher table
contains teacher ID, email. And teaching table contains course ID and teacher ID.
19 Training unit in the field of technological information - at the Supreme Council of Universities © Intellectual property rights 2024