You are on page 1of 23

DATA BASE

NORMALIZATION

By

Prof. Manikandan

Dept of Computer Application

QMC College, Chennai

manisankar27@gmail.com

NORMALIZATION

A logical design method which minimizes data


redundancy and reduces design flaws.

to improve storage efficiency, data integrity, and


scalability.

The normal forms break down large tables into


smaller subsets.

Goal:

- Eliminate redundant data in a DB.

- Ensure data dependencies make sense.

NORMALIZATION BENEFITS

Facilitates data integration.

Reduces data redundancy.

Provides a robust architecture for retrieving


and maintaining data.

Compliments data modeling.

Reduces the chances of data anomalies


occurring.

DBMS KEYS

Primary Key: Uniquely identify records from the same table. Avoid
duplicate values.

Foreign Keys: An attribute or a set of attributes of one table that is


matched to candidate keys of another table (or even the same table).
That is, a child table may reference the parent table for
appropriate attribute values.

Candidate Keys: A minimal set of attributes in a table that


uniquely identifies a record.
When there is more than one attribute in the candidate key, it is
called composite key.

NORMAL FORMS
Normalization works through a series of stages called
normal forms:

First normal form (1NF)

Second normal form (2NF)

Third normal form (3NF)

Boyce Codd normal form (BCNF)

The highest level of normalization is not always desirable.

FIRST NORMAL FORM (1NF)

Each attribute must be atomic


No

repeating columns within a row.

No

multi-valued columns.

1NF simplifies attributes


Queries

become easier.

FIRST NORMAL FORM (1NF)

SECOND NORMAL FORM (2NF)


o Each attribute must be functionally dependent on the primary key.
o Functional dependencies are the relationships among the
attributes within a relation.
the

property of one or more attributes that uniquely determines

the value of other attributes.


Any

non-dependent attributes are moved into a smaller (subset)

table.
2NF

improves data integrity.

Prevents update, insert, and delete anomalies.

FUNCTIONAL DEPENDENCE

Name, dept_no, and dept_name are functionally


dependent on emp_no. (emp_no -> name,
dept_no, dept_name)
Skills is not functionally dependent on emp_no
since it is not unique to each emp_no.

SECOND NORMAL FORM (2NF)

THIRD NORMAL FORM (3NF)


Transitive Dependencies:

Is A Relationship Between Attributes Such That


The Values Of One Attribute Is Dependent On,
Or Determined By, The Values Of Another
Attribute Which Is Not A Part Of The Key.

THIRD NORMAL FORM (3NF)

Remove transitive dependencies.


Transitive

dependence - two separate entities exist

within one table.


Any

transitive dependencies are moved into a smaller

(subset) table.

3NF further improves data integrity.


Prevents

update, insert, and delete anomalies.

TRANSITIVE DEPENDENCE

Dept_no and dept_name are functionally dependent


on emp_no however, department can be considered a
separate entity.

THIRD NORMAL FORM (3NF)

BOYCE-CODD

NORMAL FORM
(BCNF)

A relation is in BCNF if and only if every determinant is a


candidate key.

Notes:

BCNF is a stronger form of 3NF

BCNF => 3NF

Violation of BCNF happen under specific conditions:

A relation contains two (or more) composite candidate keys,

which overlap and share at least one attribute in common.

3NF > BCNF

SUMMARY

NORMALIZATION PROCESS

CONVERTING TO A CLASS DIAGRAM


TO NORMALIZED TABLE

ONE TO MANY RELATIONSHIP

Supplier(SID, Name, Address, City, State, Zip, Phone)


Employee(EID, Name, Salary, Address, )

The many side becomes a key (underlined).


Each PO has one supplier and employee.
(Do not key SID or EID)
Each supplier can receive many POs. (Key PO)
Each employee can place many POs. (Key PO)

ONE TO MANY RELATIONSHIP


SAMPLE DATA

MANY TO MANY RELATIONSHIP

Each POID can have many Items (key/underline ItemID).


Each ItemID can be on many POIDs (key POID).

N-ARY ASSOCIATIONS

Thank you..

You might also like