0% found this document useful (0 votes)
7 views15 pages

Normalforms 161013135250

The document discusses normal forms in relational database theory, which help reduce data redundancy and improve integrity through normalization. It explains the criteria for first, second, and third normal forms, including examples of violations and compliant designs. Additionally, it highlights the importance of eliminating transitive dependencies to enhance data integrity.

Uploaded by

kanaxep996
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views15 pages

Normalforms 161013135250

The document discusses normal forms in relational database theory, which help reduce data redundancy and improve integrity through normalization. It explains the criteria for first, second, and third normal forms, including examples of violations and compliant designs. Additionally, it highlights the importance of eliminating transitive dependencies to enhance data integrity.

Uploaded by

kanaxep996
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

NORMAL

FORMS

TUESDAY, FEBRUARY 18, 2025


Learning outcomes:

a) Explain the term normal form


b) Give examples of tables in normal forms
c) Identify determinants of normal forms
d) Explain the concept foreign keys
NORMAL FORMS

The normal forms (NF) of relational database


theory provide criteria for determining a table’s
degree of vulnerability to logical inconsistencies
and anomalies.
Database
normalization
Normalization is the process of organizing
the columns (attributes) and tables
(relations) of a relational database to reduce
data redundancy and improve data integrity.
FIRST NORMAL FORM

A relation is in first normal form if and only if the domain


of each attribute contains only atomic (indivisible) values,
and the value of each attribute contains only a single
value from that domain.

First normal form enforces these criteria:


1. Eliminate repeating groups in individual tables.
2. Create a separate table for each set of related data.
3. Identify each set of related data with a primary key
The following scenario illustrates how
a database design might violate first
normal form.
Customer
Telephone
Customer ID First Name Surname
Number

555-861-2025,
123 Pooja Patel
192-122-1111

(555) 403-1659
456 Zhang San Ext. 53; 182-
929-2929

789 John Doe 555-808-9633


A design that complies
with 1NORMAL FORM
Customer

Telephone
Customer ID First Name Surname
Number

123 Pooja Patel 555-861-2025

123 Pooja Patel 192-122-1111

456 Zhang San 182-929-2929

(555) 403-1659
456 Zhang San
Ext. 53

789 John Doe 555-808-9633


A design that also
complies with higher
normal forms
Customer Name
Customer
First Name Surname
ID
123 Pooja Patel
456 Zhang San
789 John Doe

Customer Telephone Number


Customer ID Telephone Number
123 555-861-2025
123 192-122-1111
456 (555) 403-1659 Ext. 53
456 123-567-1234
789 555-808-9633
Second normal form
(2NF)
A table is in 2NF if it is in 1NF and every non-
prime attribute of the table is dependent on the
whole of every candidate key.

A non-prime attribute of a table is an attribute that


is not a part of any candidate key of the table.
A VIOLATION OF 2NF
Electric Toothbrush Models

Manufacturer
Manufacturer Model Model Full Name
Country

Forte X-Prime Forte X-Prime Italy

Forte Ultraclean Forte Ultraclean Italy

Dent-o-Fresh
Dent-o-Fresh EZbrush USA
EZbrush

Kobayashi ST-60 Kobayashi ST-60 Japan

Hoch Toothmaster Hoch Toothmaster Germany

Hoch X-Prime Hoch X-Prime Germany


A VIOLATION OF 2NF

Even if the designer has specified the primary key as


{Model Full Name}, the table is not in 2NF.
{Manufacturer, Model} is also a candidate key, and
Manufacturer Country is dependent on a proper subset
of it: Manufacturer. To make the design conform to 2NF,
it is necessary to have two tables:
Electric Toothbrush Manufacturers
Manufacturer Manufacturer Country
Forte Italy
Dent-o-Fresh USA
Kobayashi Japan
Hoch Germany

Electric Toothbrush Models


Model Full
Manufacturer Model
Name
Forte X-Prime Forte X-Prime
Forte Ultraclean Forte Ultraclean
Dent-o-Fresh
Dent-o-Fresh EZbrush
EZbrush
Kobayashi ST-
Kobayashi ST-60
60
Hoch
Hoch Toothmaster
Toothmaster
Hoch X-Prime Hoch X-Prime
Third normal form (3NF)

Third Normal form applies that every non-prime


attribute of table must be dependent on primary
key, or we can say that, there should not be the
case that a non-prime attribute is determined by
another non-prime attribute. So this transitive
functional dependency should be removed from
the table and also the table must be in Second
Normal form. For example, consider a table with
following fields:
Student_Detail Table
Stree
Student_id Student_name DOB city State Zip
t
In this table Student_id is Primary key, but street, city and state
depends upon Zip. The dependency between zip and other fields
is called transitive dependency. Hence to apply 3NF, we need to
move the street, city and state to new table, with Zip as primary
key.
New Student_Detail Table
Student_id Student_name DOB Zip

Address Table
Zip Street city state
The advantage of removing transitive dependency is,

1. Amount of data duplication is reduced.


2. Data integrity achieved.

You might also like