Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

N O R M A L I Z A T I O N.

[By Afroz]

What Is Normalization ??
Normalization Is The Process Of Decomposing / Breaking Down A Larger Table To Smaller
Tables.
Or
Narmalization Is The Process Of Storing The Data In Multiple Tables By Decomposing A
Larger Table In The Database.
Or
Normalization Is The Process Of Making A Table To Obey Total Function Dependency.

Stages Of Normalization / Normal Forms:-


1) 1 Nf
2) 2 Nf
3) 3 Nf [When A Table Is Normalized Upto 3nf The Table Is Said To Be Normalized.]
4) 3.5 Nf / Bcnf
5) 4 Nf
6) 5 Nf
7) 6 Nf

Case:- Why / When A Table Should Be Normalized !?


If In A Table , If There Exists Data Redundency Issue Or Data Anomoly Issue Then We Have To
Normalize That Table To Reduce The Redundency And Anomoly Issues.

What Is Data Redundency !?


It Means Unwanted Data Repeatation In A Table.

What Is Data Anomoly !?


It Means The Problems Occurs / Side Effects Occur Because Of Redundecy,
To Perform Any Dml Operations In The Table Like Data Insertion / Updation / Deletion.

How To Perform Normalization !?


In Order To Perform Normalization /
In Order To Verify Table Is Normalized Or Not /
In Order To Verify Whether Redudency / Anomoly Exist Or Not In The Table,
Then We Must Verify The Functional Dependencies Existence Between The Attributes In The
Table.

What Is Functional Dependency ??


In A Table The Value / Data Of One Or More Attributes Are Functionally Dependent On The
Value / Data Of Another Attribute / Column In The Same Table.
Ex:- In A Relation Department Details:-{Dno , Dname , Loc}

Here,

Dname Is Dependent Upon Dno

Loc Is Dependent Upon Dno

Therefore Here We Can Declare That Dname & Loc Is Functionally Dependent Upon Dno.

What Type Of Dependecies May Present In A Table ??


1) Total Functional Dependency.
2) Partial Functional Depenedency.
3) Transitive Functional Depenedecy.

Total Functional Partial Function Transitive Functional


Dependency. Dependecy. Dependency
Redundency
Appearence
×  
Anomoly
Appearence
×  

Note:- In Order To Identify What Type Of Dependency Exists In The Table , Then We Must
Know Which Type Of Attribute Is Dependent On Which Type Of Attribute.

What Are Attribute !?


Attributes Are The Properties Of An Entity.

Example:-

Pattern To Understand Below Example:- {Entity} --> [Attributes]


{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies]

What Are The Types Of Attributes ??


1) Key Attribute / Candidate Key.
2) Non Key Attribute.
3) Prime Key Attribute.
4) Non Prime Key Attribute.
5) Compostion Key Attribute / Candidate Key / Key Attribute.
6) Super Key Attribute.
7) Forein Key Attribute.

1) Key Attribute :- In A Relation Which Ever Attribute We Use To Uniquely Identify A


Specific Entity Among The Entire Entity Set.
Example:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies]
In The Above Student Attributes Collection ,

Below We Listed Only The Key Attributes.


{Sid , Pan No , Phone No , Mail Id , Adhaar No , Instagram Id , Voter Id , Dl Num , Bank
Account Number }

2) Nonkey Attribute :- In A Relation Other Than The Key Attribute All The Remaing
Attributes Are Considered As Nonkey Attributes.
Example:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies]
In The Above Student Attributes Collection ,

Below We Listed Only The Key Attributes.


{Sid , Pan No , Phone No , Mail Id , Adhaar No , Instagram Id , Voter Id , Dl Num , Bank
Account Number }
Below We Listed The Non Key Attrubutes.
{Sname , Dob ,Address , Gender , Blood Group , Age , Percentage , Yop , Qualification , Steam
, University Name , Caste , Nationality , Marital Status , Hobbies}

3) Primekey Attribute :- In A Relation If There Exist A Primary Key , Then Those


Attributes Which Are The Part Primary Key Of The Table Those Attributes Are Known As
Prime Key Attribute.
Exampl 1:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies]
In The Above Student Attributes Collection Let Us Consider ‘Sid’ Is A Primay Key Of
The Table , Then I Can Declare That Sid Is A Prime Key Attribute.

Exampl 2:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies]
In The Above Student Attributes Collection Let Us Consider ‘Dob , Adress’ Are Togther
Is A Primay Key Of The Table , Then I Can Declare That ‘Dob’ Is A Prime Key Attribute
Or ‘Adress’ Is A Prime Key Attribute Or ‘Dob , Adress’ Is Prime Key Attribute.

4) Non-Primekey Attribute :- In A Relation Other Than Prime Key Attribute Remaing All
The Other Attributes Are Considered As Non-Prime Key Attributes
Exampl 1:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies]
In The Above Student Attributes Collection Let Us Consider ‘Sid’ Is A Primay Key Of
The Table , Then I Can Declare That Sid Is A Prime Key Attribute.

Below Listed The Non-Prime Key Attribute:

[Sname , Pan No , Dob , Phone No , Mail Id , Address , Gender , Blood Group ,Adhaar
No , Age , Percentage , Yop , Qualification , Stream , University Name , Instgram Id ,
Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number ,
Hobbies]
Exampl 2:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies]
In The Above Student Attributes Collection Let Us Consider ‘Dob , Adress’ Are Togther
Is A Primay Key Of The Table , Then I Can Declare That ‘Dob’ Is A Prime Key Attribute
Or ‘Adress’ Is A Prime Key Attribute Or ‘Dob , Adress’ Is Prime Key Attribute.

Below Listed The Non-Prime Key Attribute:

[Sid,Sname , Pan No , Phone No , Mail Id , Gender , Blood Group ,Adhaar No , Age ,


Percentage , Yop , Qualification , Stream , University Name , Instgram Id , Voter Id ,
Caste , Nationality , Marital Status , Dl Num , Banck Account Number , Hobbies]

5) Composite Key Attribute:- The Collection Or Combination Of Two More Nonkey


Attrubute Which Collectily Used As A Key Attrubute / Candidate Key. Then Those Attribute
Collectively Is Known A Composite Key Attribute.
Example:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies]
In The Above Student Attributes Collection Let Us Consider ‘Dob , Adress’ Are Togther
Is Used As One Key Attribute Then, Both ‘Dob , Adress’ Together Is Known As A
Composite Key Attribute In The Relation.
6) Super Key Attribute:- The Collection Of All The Key Attributes In A Relation Is Known
As A Super Key Attribute.

Example:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies]

Below From The Realtion Only Collected The Set Of All The Key Attrutes As A Super
Key Collectively.

[Sid , Pan No , Phone No , Mail Id , Adhaar No , Instagram Id , Voter Id , Dl Num , Bank


Account Number]

7) Foreign Key Attribute:- In A Realtion If There Exist A Foreign Key Reference Then
Those Attributes Which Is A Part Of That Foreign Key Reference That Attribute Is Known
As Foreign Key Attribute.
Example 1:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies, Student_Mock_Id]
In The Above Attributes Collection Let Us Consider ‘Student_Mock_Id’ Is A Foreign Key In
Student Table, Then In Student Table ‘Student_Mock_Id’ Is A Foreign Key Attribute.

Example 2:-
{Student} [Sid , Sname , Pannumber , Dob , Phone No , Mail Id , Adress , Gender , Blood
Group , Adhaar Number , Age , Percentage , Yop , Qualification , Stream , Univercity Name ,
Instgram Id , Voter Id , Caste , Nationality , Marital Status , Dl Num , Banck Account Number
, Hobbies],Cid,Subject_Id]
In The Above Attributes Collection Let Us Consider ‘Cid , Subject_Id’ Are Togerther Foreign
Key In Student Table, Then In Student Table ‘Cid’ Is A Foreign Key Attribute Or Subject_Id
Is Also A Foreign Key Attribute Or ‘Cid , Subject_Id’ Is Also A Foreign Key Attribute.

You might also like