Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
43 views
7 pages
Normalization
Uploaded by
Moody Maxi Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Normalization For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
43 views
7 pages
Normalization
Uploaded by
Moody Maxi Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Normalization For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Normalization For Later
You are on page 1
/ 7
Search
Fullscreen
What is Normalization? Normalization is a database design technique that reduces data redundancy and eliminates undesirable characteristics like Insertion, Update and Deletion Anomalies. Normalization rules divides larger tables into smaller tables and links them using relationships. The purpose of Normalisation in SQL is to eliminate redundant (repetitive) data and ensure data is stored logically. ° Database Normal Forms Hereis a list of Normal Forms in SQL: «+ INF (First Normal Form) + 2NF (Second Normal Form) «+ 3NF (Third Normal Form) + BCNF (Boyce-Codd Normal Form) «+ ANF (Fourth Normal Form) + SNF (Fifth Normal Form) * GNF (Sixth Normal Form) The Theory of Data Normalization in MySQL servers still being developed further. For example, there are discussions even on 6" Normal Form, However, in most practical applications, normalization achieves its best in3 Normal Form. The evolution of Normalization in SQL theories is illustrated below- Database Normal Forms:Database Normalization With Examples Database Normalization Example can be easily understood with the help of a case study. Assume, a video library maintains a database of movies rented out. Without any normalization in database, all information is stored in one table as shown below, Let's understand Normalization database with normalization example with solution: FULL NAMES PHYSICAL MOVIES RENTED SALUTATION ADDRESS Janet Jones First Street Plot Pirates of the Ms. No4 Caribbean, Clash of the Titans Robert Phil 3" Street 34 Forgetting Sarah Mr. Marshal, Daddy’s Little Girls Robert Phil 5" Avenue Clash of the Titans | Mi Here you see Movies Rented column has multiple values. Now let's move into ast Normal Forms: NF (First Normal Form) Rules ‘+ Each table cel should contain a single value. «+ Each record needs to be unique. ‘The above table in 1NF- INF Example FULL NAMES: PHYSICAL MOVIES RENTED SALUTATION ADDRESS Janet Jones First Street Plot | Pirates of the Ms. No4 Caribbean Janet Jones First Street Plot | Clash of the Titans | Ms. Noa Robert Phil 3 Street 34 Forgetting Sarah Mr. Marshal Robert Phil 3 Street 34 Daddy's Little Girls | Mr. Robert Phil 5! Avenue Clash of the Titans | Mr.Before we proceed let's understand a few things — What is a KEY in SQL? AKEY in SQL isa value used to identify records ina table uniquely. An SQL KEY is a single column or combination of multiple columns used to uniquely identify rows or tuples in the table, SQL Key is used to identify duplicate information, and it also helps establish a relationship between multiple tables in the database, Note: Columns in a table that are NOT used to identify a record uniquely are called non-key columns. Whats a Primary Key? Primary Ko Primary Key in DBMS Aprimary is a single column value used to identify a database record uniquely. Ithas following attributes + Aprimary key eannot be NULL + Aprimary key value must be unique The primary key values should rarely be changed The primary key must be given a value when a new record is inserted. What is Composite Key? composite key is a primary key composed of multiple columns used to identify a record uniquely In our database, we have two people with the same name Robert Phil, but they live in different places. Composite Key 3" Street 34 Daddy's Little Girls | Mr. Clash of the Titans | Mr. on Read name as nell Address to atiqnely identify a record. Composite key in DatabaseHence, we require both Full Name and Address to identity a record uniquely. Thats a composite key. Lets move into second normal form 2NF 2NF (Second Normal Form) Rules + Rule 2-BeinaNF + Rule 2-Single Column Primary Key that doesnot functionally dependant on any subset of candidate key relation Itis clear that we can’t move forward to make our simple databace in 2”Y Normalization form unless we partition the table above. MEMBERSHIP 1D | FULL NAMES PHYSICAL ADDRESS __| SALUTATION 1 Janet Jones | First Street Plot No@ | Ms. 2 Robert Phil 2" Street 34 Me 3 Robert Phi SP Avenue Me. Ma ‘MoaesneNrED 1 "Pirates ofthe carbbean 1 eh ofthe Thane 2 [ rorgettingsarah Marshal 2 aday sutve Gris a (lsh ofthe Tans We have divided our 1NF table into two tables viz. Table 1 and Table2. Table 1 contains member information. Table 2 contains information on movies rented. We have introduced a new column called Membership_id which is the primary key for table 1. Records can be Uniquely identified in Table 1 using membership id Database - Foreign Key tn Table 2, Membership_ID is the Foreign Key Mawsensae | Nowe newreD 1 [rates ofthe Corbbean 1 ‘Gash of the Tans 2 | ForgettingSarah Marshal 2 Daddy stile Gs 3 [lash of the Tansoui Ka Foreign Key in DBMS, Foreign Key references the primary key of another Table! It helps connect your Tables. + Aforeign key can havea different name from its primary key ‘+ Itensures rowsin one table have corresponding rows in another ‘+ Unlike the Primary key, they do not have to be unique. Most often they aren’t ‘+ Foreign keys can be null even though primary keys can not o& Foreign Key MEMBERSHIP ID. MOVIES RENTED Pirates ofthe Caribbean 1 Cashofthe Trans Forgetting Sarah Marshal 2 Dad Lite Gils CGashofthe Tans Foreign Key references Primary Key Foreign Key can only have values present in primary key It could have a name other than that of Primary Key So Pimary Key FULL NAMES: PHYSICALADDRESS __| SALUTATION $$" anet Jones First Street Plot Nod Ms. 2 Robert Phil 3° Street 34 Mr. 3 Robert Phil Avenue Mr.Why do you need a foreign key? ‘Suppose, a novice inserts a record in Table B such as Insert a record in Table 2 where Member ID =f01 Mewpensime m__| Movies RENTED 101 Mission Impossible act Membership 1D 101 is act present in Table 1 MEMBERSHIPID | FULLNAMES PHYSICAL ADDRESS __| SALUTATION 1 Tanet Jones First Street Plot No@ | Ms. 2 Robert Phil 3 Street 34 Mr. < 3 Robert Phil S™ Avenue Me. Database wil theont an ERROR. This helps in refereatial integrity You will only be able to insert values into your foreign key that exist in the unique key in the parent table. This, helps in referential integrity ‘The above problem can be overcome by declaring membership id from Table? as foreign key of membership Id from Tablet 3NF (Third Normal Form) Rules » Rule 1-Bein 2NF + Rule 2-Has no transitive functional dependencies To move our 2HF table into 3NF, we again need to again die our table. 3NF Example Below is 3 3NF example in SQL database: Mavens © | Pus navies Prien Anoaess | Suutaron 1D 1 Tenetlones Fist SueetPotNod 2 2 ober Pht Tsetse 1 3 ‘over Phit averse 1 Mevecem © | Mores eae 1 Pateso! the Cares 1 Cash ofthe Tans z Forgetting Sarah ash 2 Cady tle Gs 3 Cash of the rans Saanon 1D | Sauranon 1 Me 2 Ms. 3 Ms ’ &We have again divided our tables and created a new table which stores Salutations. ‘There are no transitive functional dependencies, and hence our tableis in 3NF In Table 3 Salutation ID is primary key, and in Table 1 Salutation ID is foreign to primary key in Table 3
You might also like
FDBMS Unit 4, 5
PDF
No ratings yet
FDBMS Unit 4, 5
35 pages
Database Normalization
PDF
No ratings yet
Database Normalization
11 pages
Normalization
PDF
No ratings yet
Normalization
20 pages
SQ L Normalization
PDF
100% (1)
SQ L Normalization
9 pages
Database Normalization
PDF
No ratings yet
Database Normalization
8 pages
DMBS Unit 2
PDF
No ratings yet
DMBS Unit 2
16 pages
Topic 2 - Normalization Notes
PDF
No ratings yet
Topic 2 - Normalization Notes
5 pages
What Is Normalization in DBMS
PDF
No ratings yet
What Is Normalization in DBMS
9 pages
What Is Database Normalization
PDF
No ratings yet
What Is Database Normalization
12 pages
What Is Normalization in DBMS
PDF
No ratings yet
What Is Normalization in DBMS
11 pages
Database Normalization
PDF
No ratings yet
Database Normalization
7 pages
Normalization With Examples
PDF
No ratings yet
Normalization With Examples
21 pages
What Is Normalization in DBMS (SQL) - 1NF, 2NF, 3NF, BCNF Database With Example
PDF
No ratings yet
What Is Normalization in DBMS (SQL) - 1NF, 2NF, 3NF, BCNF Database With Example
8 pages
Normalization Detail
PDF
No ratings yet
Normalization Detail
9 pages
4.what Is Normalization PDF
PDF
No ratings yet
4.what Is Normalization PDF
9 pages
Normalization Lesson
PDF
No ratings yet
Normalization Lesson
13 pages
Unit Ii Normalization - Codds Rules
PDF
No ratings yet
Unit Ii Normalization - Codds Rules
30 pages
Week 6
PDF
No ratings yet
Week 6
9 pages
Primary Key, Foreign Key and Unique Key
PDF
No ratings yet
Primary Key, Foreign Key and Unique Key
4 pages
Normal
PDF
No ratings yet
Normal
10 pages
Database Normalization: MIS 520 - Database Theory Fall 2001 (Day) Lecture 4/5/6
PDF
No ratings yet
Database Normalization: MIS 520 - Database Theory Fall 2001 (Day) Lecture 4/5/6
32 pages
CS331 - Chapter 5 Normalization
PDF
No ratings yet
CS331 - Chapter 5 Normalization
35 pages
CHECK Constraint:: DROP A FOREIGN KEY Constraint
PDF
No ratings yet
CHECK Constraint:: DROP A FOREIGN KEY Constraint
5 pages
What Is Normalization? Why Should We Use It?
PDF
No ratings yet
What Is Normalization? Why Should We Use It?
4 pages
CS331 - Chapter5 Normalization
PDF
No ratings yet
CS331 - Chapter5 Normalization
35 pages
Normalization
PDF
No ratings yet
Normalization
4 pages
Normal Form - Unit - II
PDF
No ratings yet
Normal Form - Unit - II
13 pages
DBMS Normalization
PDF
No ratings yet
DBMS Normalization
53 pages
Normalization Practice Questions
PDF
No ratings yet
Normalization Practice Questions
11 pages
Week 3 Dbms
PDF
No ratings yet
Week 3 Dbms
6 pages
Normalization Part I
PDF
No ratings yet
Normalization Part I
60 pages
DBMS Unit 5
PDF
No ratings yet
DBMS Unit 5
28 pages
Keys Overview
PDF
No ratings yet
Keys Overview
7 pages
MS SQL
PDF
No ratings yet
MS SQL
95 pages
MS SQL
PDF
No ratings yet
MS SQL
95 pages
KEYS and Normalization
PDF
No ratings yet
KEYS and Normalization
7 pages
SQL
PDF
No ratings yet
SQL
6 pages
Prepared By:: Biplap Bhattarai
PDF
No ratings yet
Prepared By:: Biplap Bhattarai
27 pages
RDBMS Concepts
PDF
No ratings yet
RDBMS Concepts
54 pages
IFN554 Week3 Tutorial With Solutions v2-1
PDF
No ratings yet
IFN554 Week3 Tutorial With Solutions v2-1
30 pages
Normalisation Workbbook Edited
PDF
No ratings yet
Normalisation Workbbook Edited
14 pages
12.1 Manupulating Data - Relational Data Base
PDF
No ratings yet
12.1 Manupulating Data - Relational Data Base
25 pages
05 Normalization
PDF
No ratings yet
05 Normalization
20 pages
Normalization Ii
PDF
No ratings yet
Normalization Ii
2 pages
Normalization
PDF
No ratings yet
Normalization
40 pages
MySQL Database Design
PDF
No ratings yet
MySQL Database Design
21 pages
Normalization
PDF
No ratings yet
Normalization
41 pages
SQL Constraints
PDF
No ratings yet
SQL Constraints
18 pages
Normalization & De-Normalization: Group Members
PDF
No ratings yet
Normalization & De-Normalization: Group Members
46 pages
12th Computer CHP 2
PDF
No ratings yet
12th Computer CHP 2
4 pages
Dbms Unit 3
PDF
No ratings yet
Dbms Unit 3
9 pages
Unit 1dbms Merged
PDF
No ratings yet
Unit 1dbms Merged
30 pages
Normalization Slide
PDF
No ratings yet
Normalization Slide
28 pages
Relational Database SQL
PDF
No ratings yet
Relational Database SQL
28 pages
SQL Server Till Basic Group by
PDF
No ratings yet
SQL Server Till Basic Group by
31 pages
Database Techniques DB Normalization
PDF
No ratings yet
Database Techniques DB Normalization
37 pages
Primary Key and Foreign Key
PDF
No ratings yet
Primary Key and Foreign Key
7 pages
Key in Dbms
PDF
No ratings yet
Key in Dbms
5 pages