0% found this document useful (0 votes)
6 views

Normalization

Normalization is the process of organizing data in a database to minimize redundancy and dependency. This includes creating tables and relationships between tables according to rules. The first normal form requires that each attribute contain a single value and that the key contains a unique identifier for each attribute. The second normal form eliminates redundant data across tables by ensuring non-key attributes are dependent on the whole primary key. The third normal form removes transitive dependencies and ensures each non-prime attribute is dependent only on the primary key. An example shows a student table that violates 3NF by having a transitive dependency between student ID and city through zip code. The table is normalized into 3NF by splitting it based on dependencies.

Uploaded by

sushmapoudel2427
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Normalization

Normalization is the process of organizing data in a database to minimize redundancy and dependency. This includes creating tables and relationships between tables according to rules. The first normal form requires that each attribute contain a single value and that the key contains a unique identifier for each attribute. The second normal form eliminates redundant data across tables by ensuring non-key attributes are dependent on the whole primary key. The third normal form removes transitive dependencies and ensures each non-prime attribute is dependent only on the primary key. An example shows a student table that violates 3NF by having a transitive dependency between student ID and city through zip code. The table is normalized into 3NF by splitting it based on dependencies.

Uploaded by

sushmapoudel2427
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Normalization.

Er.Amul Shrestha
• Normalization is the process of organizing data in a database.

• It includes creating tables and establishing relationships between


those tables according to rules designed both to protect the data and
to make the database more flexible by eliminating redundancy and
inconsistent dependency.
What is Data Redundancy ??
• Repetition of similar data in multiple data in a single table is Data
Redundancy.
• Data Redundancy increases the size of database.
• Other issue on Data Redundancy
• Insertion Anamoly
• Update Anamoly
• Deletion Anamoly.
1NF.
• The table should not contain any multivalued attributes.
• If a relation contains a composite or multi-valued attribute, it violates
the first normal form, or the relation is in the first normal form if it
does not contain any composite or multi-valued attribute.
• A relation is in first normal form if every attribute in that relation is
single-valued attribute.
• A table is in 1 NF if:
• There are only Single Valued Attributes.
• Attribute Domain does not change.
• There is a unique name for every Attribute/Column.
• The order in which data is stored does not matter.
2NF.
• Rules:
• 1. Table or Realtions must be in 1NF
• 2. All non prime attributes,should be fully functional dependent on
Candidate key. i.e There should be no Partial dependency,in the
relation.
• Note: The Second Normal Form tries to reduce any redundant data
from getting stored in the system’s memory. For instance, if we take an
example of about 100 candidates taking the S1 subject, then we don’t
have to store their fees as 1000 as a record for all the 100 candidates.
Rather, we can store them all at once in the second table as the subject
fee for S1 is 1000.
3NF Student_id Student_nam Student zip Student_city
e code
301 Ram 001 Gulmi
302 Sita 005 pokhara
301 Ram 009 Palpa
303 hari 007 Butwal

RULES
1.Must be in 2NF
2. No transition Dependency exists. Non prime attributes is dependent in
the Primary key.

Above table is not in 3NF because, Student_id -> Student_city (Transitive Dependency.)
Student zipcode is not super key ,and student city is not Prime attributes.
Student_id Student_na Student_zip Student_zipcode Student_city
me code
301 Ram 001 001 Gulmi

301 Ram 009 009 Palpa

302 Sita 005 005 Pokhara

303 Hari 007 007 Butwal

We have converted Table into 3NF , By converting into 2 parts which doesn’t have any transitive
dependencies.

You might also like