You are on page 1of 27

System Analysis & Design

Section 7
Eng. Faten Khalifa
SDLC
 Interview Project
 JAD Session Planning Plan 
 Questionnaire
 Data Flow Diagram
 Data Dictionary Analysis
 Process Specification
 Entity Relationship
8. Normalization Design

Implementation
Normalization
 Normalization is a technique that can help analysts validate
the ERD

 It is a process whereby a series of rules are applied to the


ERD to determine how well formed it is.

 Rules = normal forms


1. 1NF (First Normal Form)
2. 2NF (Second Normal Form)
3. 3NF (Third Normal Form)
4. BCNF (Boyce-Codd Normal Form)
5. 4NF (Fourth Normal Form)
6. 5NF (Fifth Normal Form)
7. 6NF (Sixth Normal Form)
Normalization Example 1
ID Name City Code_Area C_ID C_Name Hours Grade
1 Ahmed Ali Tanta 040 CS01 File Structure 80 93
1 Ahmed Ali Tanta 040 CS02 System Analysis 70 88
1 Ahmed Ali Tanta 040 CS03 Operating System 80 78
2 Heba Samir Shebin 048 CS01 File Structure 80 55
2 Heba Samir Shebin 048 CS02 System Analysis 70 87
2 Heba Samir Shebin 048 CS03 Operating System 80 91
3 Samar Saed Tanta 040 CS01 File Structure 80 67
3 Samar Saed Tanta 040 CS02 System Analysis 70 96
3 Samar Saed Tanta 040 CS03 Operating System 80 87
4 Amr Emad Shebin 048 CS01 File Structure 80 57
4 Amr Emad Shebin 048 CS02 System Analysis 70 89
4 Amr Emad Shebin 048 CS03 Operating System 80 74
Normalization

1NF (First Normal Form):


• “No repeating attributes and repeating groups”
• Every attribute in an entity should have only one value per
instance.
Example 1: 1NF (Remove Repeating Group)
ID Name City Code_Area ID C_ID C_Name Hours Grade

1 Ahmed Ali Tanta 040 1 CS01 File Structure 80 93


2 Heba Samir Shebin 048 1 CS02 System Analysis 70 88
3 Samar Saed Tanta 040 1 CS03 Operating System 80 78
4 Amr Emad Shebin 048 2 CS01 File Structure 80 55
2 CS02 System Analysis 70 87
2 CS03 Operating System 80 91
3 CS01 File Structure 80 67
3 CS02 System Analysis 70 96
3 CS03 Operating System 80 87
4 CS01 File Structure 80 57
4 CS02 System Analysis 70 89
4 CS03 Operating System 80 74
Normalization

2NF (Second Normal Form):


• “No partial dependency”
Example 1: 2NF (Remove Partial Dependency)
ID Name City Code_Area ID C_ID Grade

1 Ahmed Ali Tanta 040 1 CS01 93


2 Heba Samir Shebin 048 1 CS02 88
3 Samar Saed Tanta 040 1 CS03 78
4 Amr Emad Shebin 048 2 CS01 55
2 CS02 87
C_ID C_Name Hours
2 CS03 91
CS01 File Structure 80
3 CS01 67
CS02 System Analysis 70
3 CS02 96
CS03 Operating System 80
3 CS03 87
4 CS01 57
4 CS02 89
4 CS03 74
Normalization

3NF (Third Normal Form):


• “No transitive dependency”
Example 1: 3NF (Remove Transitive
Dependency)
ID Name City ID C_ID Grade

1 Ahmed Ali Tanta 1 CS01 93


2 Heba Samir Shebin 1 CS02 88
3 Samar Saed Tanta 1 CS03 78
4 Amr Emad Shebin 2 CS01 55
2 CS02 87
C_ID C_Name Hours
2 CS03 91
CS01 File Structure 80 3 CS01 67
CS02 System Analysis 70 3 CS02 96
CS03 Operating System 80 3 CS03 87
4 CS01 57
City Code_Area
4 CS02 89
Tanta 040
4 CS03 74
Shebin 048
Notes on Normalization Steps
 2NF requires:
1. that the data model is in 1NF
2. that the data model leads to entities containing attributes
that are dependent on the whole identifier(i.e., partial
dependency)

 3NF occurs when:


1. a model is in both 1NF and 2NF
2. none of the attributes is dependent on a nonidentifier
attribute (i.e., transitive dependency).
Example 1: ERD

Student Grade Course

City
Normalization Example 2

• Initial CD purchase file that is used by the existing CD sales system


Normalization Example 2

Error
Many-to-Many
relationships
Normalization Example 2
Normalization Example 2
Normalization Example 2
Normalization Example 3
The following table contains sample data for parts and for vendors
who supply those parts.

Part Number Description Vendor Name Address Unit Cost


1234 Logic chip Fast Chips Intel 10.00
Smart Chips IBM 8.00
5678 Memory chip Fast Chips Intel 3.00
Quality Chips Phoenix 2.00
Smart Chips IBM 5.00
Normalization Example 3
1. Convert the relations into the 1NF.

Part Number Description Part Number Vendor Name Address Unit Cost
1234 Logic chip 1234 Fast Chips Intel 10.00
5678 Memory chip 1234 Smart Chips IBM 8.00
5678 Fast Chips Intel 3.00
5678 Quality Chips Phoenix 2.00
5678 Smart Chips IBM 5.00
Normalization Example 3
2. Perform the 2NF to the previous resulted relations.

Part Number Description Part Number Vendor Name Unit Cost


1234 Logic chip 1234 Fast Chips 10.00
5678 Memory chip 1234 Smart Chips 8.00
5678 Fast Chips 3.00
5678 Quality Chips 2.00
Vendor Name Address
5678 Smart Chips 5.00
Fast Chips Intel
Smart Chips IBM
Quality Chips Phoenix
Normalization Example 3
3. Develop a set of 3NF to the resulted relations
** The tables are in 3NF.
Part Number Description Part Number Vendor Name Unit Cost
1234 Logic chip 1234 Fast Chips 10.00
5678 Memory chip 1234 Smart Chips 8.00
5678 Fast Chips 3.00
5678 Quality Chips 2.00
Vendor Name Address
5678 Smart Chips 5.00
Fast Chips Intel
Smart Chips IBM
Quality Chips Phoenix
Normalization Example 4
• A engineering consultancy firm supplies
temporary specialized staff to bigger
companies in the country to work on their
project for certain amount of time.
• The table below lists the time spent by each of
the company’s employees at other companies
to carry out projects. The National Insurance
Number (NIN) is unique for every member of
staff.
Normalization Example 4
NIN Contract No Hours Employee Name Company ID Company Location
616681B SC1025 72 P. White SC115 Belfast
674315A SC1025 48 R. Press SC115 Belfast
323113B SC1026 24 P. Smith SC23 Bangor
616681B SC1026 24 P. White SC23 Bangor

1. Find Fully Functional Dependencies on the PK and Partial


Dependencies on the PK.

NIN, ContractNo  Hours


NIN  Employee_Name
Contract_NO  Company_ID, Company_Location
Normalization Example 4
2. Normalize the table to 2NF
NIN Employee Name Contract No Company ID Company Location
616681B P. White SC1025 SC115 Belfast
674315A R. Press SC1026 SC23 Bangor
323113B P. Smith

NIN Contract No Hours


616681B SC1025 72
674315A SC1025 48
323113B SC1026 24
616681B SC1026 24
Normalization Example 4
3. Find the transitive dependencies and normalize the tables to 3NF
Contract_NO  Company_ID
Company_ID  Company_Location
NIN Employee Name Contract No Company ID
616681B P. White SC1025 SC115
674315A R. Press SC1026 SC23
323113B P. Smith

NIN Contract No Hours Company ID Company Location


616681B SC1025 72 SC115 Belfast
674315A SC1025 48 SC23 Bangor
323113B SC1026 24
616681B SC1026 24
REQUIRED
• Complete your project:
1. Apply the normalization to the ERD of your
project.

You might also like