SlideShare a Scribd company logo
Chapter 4
Normalization of Database
Tables
Database Tables and
Normalization




Table is basic building block in database design
Table’s structure is of great interest
Two cases:





possible poor table structures in good database design
Modify existing database with existing poor table
structure

Normalization can help recognize a poor table and
convert to good tables with good structure
2
Database Tables and
Normalization


Normalization is process for assigning
attributes to entities
Reduces data redundancies
 Expending entities
 Helps eliminate data anomalies
 Produces controlled redundancies to link tables
 Cost more processing efforts
 Series steps called normal forms


3
Database Tables and
Normalization


Normalization stages
1NF - First normal form
 2NF - Second normal form
 3NF - Third normal form
 4NF - Fourth normal form


Better in
dependency

Business
Bioinformatics
Statistical data

Worse in
performance
(I/O)
4
Database Tables and
Normalization


Example: construction company


Building projects







Project number
Project name
Employees assigned
…

Employee




Employee number
Employee name
Job classification
5
Table 4.1 should be here.

6
Figure 4.1 Observations




PRO_NUM intended to be primary key, but
it contains null values.
Table entries invite data inconsistencies

7
Figure 4.1 Observations


Table displays data redundancies which yield
the following anomalies


Update




Insertion




Modifying JOB_CLASS
New employee must be assigned project (phantom
project)

Deletion


If employee deleted, other vital data lost

8
Figure 4.2 is insert here.

Repeating group (any project can have a group of
data entries) which should not to be appeared in
relational table
9
Data Organization: 1NF
PK

PK

Figure 4.3

10
Conversion to 1NF


Repeating groups must be eliminated


Proper primary key developed
Uniquely identifies attribute values (rows)
 Combination of PROJ_NUM and EMP_NUM


11
Conversion to 1NF


Repeating groups must be eliminated


Dependencies can be identified



A particular relationship between two attributes. For a given
relation, attribute B is functionally dependent on attribute A
if, for every valid value of A, that value of A uniquely
determines the value of B.



A functional dependency exists when the value of one thing
is fully determined by another. For example, given the
relation EMP(empNo, empName, sal), attribute empName
is functionally dependant on attribute empNo. If we know
empNo, we also know the empName.
12
Desirable dependencies based on primary key
Less desirable dependencies
Partial
based on part of composite primary key
Transitive
one nonprime attribute depends on
another nonprime attribute
13
Dependency Diagram (1NF)
Above: Desired Dependencies

Figure 4.4

Composite primary key
Below: Less Desired Dependencies

14
PROJ_NUM,EMP_NUM  PROJ_NAME, EMP_NAME,
JOB_CLASS,CHG_HOUR, HOURS

DESIRED DEPENDENCIES

PROJ_NUM  PROJ_NAME

PARTIAL DEPENDENCIES

EMP_NUM  EMP_NAME, JOB_CLASS, CHG_HOUR

JOB_CLASS -> CHG_HOUR

TRANSITIVE DEPENDENCIES

15
1NF Summarized




All key attributes defined
No repeating groups in table
All attributes dependent on
primary key

16
Conversion to 2NF






Start with 1NF format:
Write each key component on separate line
Write original key on last line
Each component is new table
Write dependent attributes after each key

PROJECT (PROJ_NUM, PROJ_NAME)
EMPLOYEE (EMP_NUM, EMP_NAME, JOB_CLASS, CHG_HOUR)
ASSIGN (PROJ_NUM, EMP_NUM, HOURS)
17
2NF Conversion Results
Figure 4.5

18
2NF Summarized



In 1NF
Includes no partial dependencies




No attribute dependent on a portion of primary
key

Still possible to exhibit transitive dependency


Attributes may be functionally dependent on
nonkey attributes

19
Conversion to 3NF


Create separate table(s) to eliminate transitive
functional dependencies

PROJECT (PROJ_NUM, PROJ_NAME)
ASSIGN (PROJ_NUM, EMP_NUM, HOURS)
EMPLOYEE (EMP_NUM, EMP_NAME, JOB_CLASS)
JOB (JOB_CLASS, CHG_HOUR)

20
3NF Summarized



In 2NF
Contains no transitive
dependencies

21
Additional DB Enhancements

Figure 4.6

22
23
Boyce-Codd Normal Form
(BCNF)


Every determinant in the table is a candidate
key
Determinant is attribute whose value determines
other values in row
 3NF table with one candidate key is already in
BCNF


24
3NF Table Not in BCNF

Figure 4.7

25
Decomposition of Table
Structure to Meet BCNF

Figure 4.8
26
Example: BCNF conversion

27
Decomposition into BCNF

Figure 4.9
28
Normalization and Database
Design








Normalization should be part of the design
process
Make sure the proposed entities meet the
required normal form before the table
structures are created
Used to redesign or modify the existing table
structures.
E-R Diagram provides macro view
29
Normalization and Database
Design


Normalization provides micro view of
entities
Focuses on characteristics of specific entities
 May yield additional entities






Difficult to separate normalization from E-R
diagramming
Business rules must be determined
30
Normalization and Database
Design


Contracting company’s example:

PROJECT (PROJ_NUM, PROJ_NAME)
EMPLOYEE(EMP_NUM, EMP_LNAME,EMP_FNAME,EMP_INITAL,
JOB_DESCRIPTION, JOB_CHG_HOUR);

31
Initial ERD for Contracting
Company

Figure 4.10
There is a transitive dependency

Already 3NF
32
Removal
PROJECT (PROJ_NUM, PROJ_NAME)
EMPLOYEE(EMP_NUM, EMP_LNAME,EMP_FNAME,EMP_INITAL,
JOB_CODE)
JOB (JOB_CODE, JOB_DESCRIPTION, JOB_CHG_HOUR);

33
Modified ERD for
Contracting Company

Figure 4.11

34
Final ERD for
Contracting Company

Figure 4.12
(M:N) converting to (1:M)

35
PROJECT (PROJ_NUM, PROJ_NAME, EMP_NUM)
EMPLOYEE(EMP_NUM, EMP_LNAME,EMP_FNAME,EMP_INITAL,
EMP_HIREDATE, JOB_CODE)
JOB (JOB_CODE,, JOB_DESCRIPTION, JOB_CHG_HOUR);
ASSIGN((ASSIGN_NUM, ASSIGN_DATE, ASSIGN_HOURS,
ASSIGN_CHG_HOURS, ASSIGN_CHARGE, EMP_NUM, PROJ_JUM)

36
37
Denormalization




Normalization is one of many database
design goals
Normalized table requirements
Additional processing
 Loss of system speed


38
Denormalization


Normalization purity is difficult to sustain
due to conflict in:
Design efficiency
 Information requirements
 Processing


39

More Related Content

PPT
Normalization case
PPTX
Database Concept - Normalization (1NF, 2NF, 3NF)
PPTX
introduction to database
PPTX
Introduction to oracle database (basic concepts)
PDF
Normalization in DBMS
PPT
Normalization PRESENTATION
PPTX
Dbms anomalies
PDF
Database Normalization
Normalization case
Database Concept - Normalization (1NF, 2NF, 3NF)
introduction to database
Introduction to oracle database (basic concepts)
Normalization in DBMS
Normalization PRESENTATION
Dbms anomalies
Database Normalization

What's hot (20)

PPTX
Normalization
PPTX
DBMS (UNIT 2)
PPTX
Database Concepts and Components
PPT
3 Tier Architecture
PPT
Normlaization
PPTX
Normalization in RDBMS
PPTX
Lect 08 materialized view
PDF
Trees, Binary Search Tree, AVL Tree in Data Structures
PDF
Relational Database Design
PPTX
Normalization in a Database
PPTX
Data Modeling
PPTX
normaliztion
PPT
Relational database oracle
PDF
Heaps
PPTX
06.01 sql select distinct
PPTX
Data Redundancy & Update Anomalies
PPT
Lecture 01 introduction to database
PPTX
Oracle Hyperion and Planning Public Sector Budgeting
PPT
Sequences and indexes
Normalization
DBMS (UNIT 2)
Database Concepts and Components
3 Tier Architecture
Normlaization
Normalization in RDBMS
Lect 08 materialized view
Trees, Binary Search Tree, AVL Tree in Data Structures
Relational Database Design
Normalization in a Database
Data Modeling
normaliztion
Relational database oracle
Heaps
06.01 sql select distinct
Data Redundancy & Update Anomalies
Lecture 01 introduction to database
Oracle Hyperion and Planning Public Sector Budgeting
Sequences and indexes
Ad

Viewers also liked (20)

PPT
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
PPT
Normalization of database tables
PDF
Database design & Normalization (1NF, 2NF, 3NF)
PPTX
Database Normalization
PPTX
Normalization in Database
PPT
Lecture 04 normalization
PPTX
Database - Normalization
PPTX
Database Normalization
PPT
Waste Data and LDF Preparation - Trevor Brown
PPTX
Database Join
PPT
Sub join a query optimization algorithm for flash-based database
DOCX
Dbm 380 week 3 learning team ms access tables
PPT
b - Normalizing a Data Model
PPTX
Database Introduction - Join Query
PPT
Scrum Model
PPT
Dbms ii mca-ch8-db design-2013
PPT
Dbms ii mca-ch7-sql-2013
PPT
Dbms ii mca-ch10-concurrency-control-2013
PPTX
SQL Join Basic
PDF
Joins in databases
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Normalization of database tables
Database design & Normalization (1NF, 2NF, 3NF)
Database Normalization
Normalization in Database
Lecture 04 normalization
Database - Normalization
Database Normalization
Waste Data and LDF Preparation - Trevor Brown
Database Join
Sub join a query optimization algorithm for flash-based database
Dbm 380 week 3 learning team ms access tables
b - Normalizing a Data Model
Database Introduction - Join Query
Scrum Model
Dbms ii mca-ch8-db design-2013
Dbms ii mca-ch7-sql-2013
Dbms ii mca-ch10-concurrency-control-2013
SQL Join Basic
Joins in databases
Ad

Similar to Normalization of database_tables_chapter_4 (20)

PPT
database administration level 3 _lecture5.ppt
PPT
DBMS e evevevevevevevbebrbbrbrbrbrbrbrb 4.ppt
PPTX
Chapter Four Logical Database Design (Normalization).pptx
PPTX
Chapter 3 ( PART 2 ).pptx
PPTX
Normalization
PPT
Lecture8 Normalization Aggarwal
PDF
Penormalan/Normalization
PPTX
Database normalization
PPTX
DBMS_Module 3_Functional Dependencies and Normalization.pptx
PPTX
Presentation on Normalization.pptx
DOCX
Advanced Database Systems CS352Unit 4 Individual Project.docx
PPTX
Chapter 4.pptxdatabase presentation foe fund
PPTX
Normalization in rdbms types and examples
PPTX
Normalization in Relational database management systems
PPT
Chapter six - Normalization.ppt fundamental of db
PPTX
04 CHAPTER FOUR - INTEGRITY CONSTRAINTS AND NORMALIZATION.pptx
DOCX
Database DESIGN CONCEPTSDr. Dexter Francis2Data Design
PDF
04 quiz 1 answer key
PPT
Relational Algebra.ppt
PPTX
DBMS Module-2 notes for engineering BE vtu
database administration level 3 _lecture5.ppt
DBMS e evevevevevevevbebrbbrbrbrbrbrbrb 4.ppt
Chapter Four Logical Database Design (Normalization).pptx
Chapter 3 ( PART 2 ).pptx
Normalization
Lecture8 Normalization Aggarwal
Penormalan/Normalization
Database normalization
DBMS_Module 3_Functional Dependencies and Normalization.pptx
Presentation on Normalization.pptx
Advanced Database Systems CS352Unit 4 Individual Project.docx
Chapter 4.pptxdatabase presentation foe fund
Normalization in rdbms types and examples
Normalization in Relational database management systems
Chapter six - Normalization.ppt fundamental of db
04 CHAPTER FOUR - INTEGRITY CONSTRAINTS AND NORMALIZATION.pptx
Database DESIGN CONCEPTSDr. Dexter Francis2Data Design
04 quiz 1 answer key
Relational Algebra.ppt
DBMS Module-2 notes for engineering BE vtu

Recently uploaded (20)

PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
master seminar digital applications in india
PDF
RMMM.pdf make it easy to upload and study
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
master seminar digital applications in india
RMMM.pdf make it easy to upload and study
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Insiders guide to clinical Medicine.pdf
Cell Types and Its function , kingdom of life
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Module 4: Burden of Disease Tutorial Slides S2 2025
Renaissance Architecture: A Journey from Faith to Humanism
Supply Chain Operations Speaking Notes -ICLT Program
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Institutional Correction lecture only . . .
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf

Normalization of database_tables_chapter_4