SlideShare a Scribd company logo
Anu. S
anusdhar4@gmail.com
www.facebook.com/AnuSasidharan
twitter.com/username
in.linkedin.com/in/profilename
DATABASE NORMALIZATION
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
DATABASE NORMALIZATION
LEVELS OF NORMALIZATION
SOLVED EXAMPLE
DATABASE NORMALIZATION
What is normalization????
Why normalize the database???
Strength and drawback of normalization..!!!
What is actually normalization???
The process of analyzing a given relational schema
based on their functional dependencies and
primary keys.
Why normalize database????
Minimizing redundancy
Accuracy
Performance
Strength And Drawback of Databases...!!!!
Strength:
Reduces Redundancy
Reduces errors
Drawback:
No of tables increases
Complexity increases
LEVELS OF NORMALIZATION
1NF
2NF
3NF
BCNF
4NF
5NF
DKNF
Redundancy
NumberofTables
Complexity
FIRST NORMAL FORM-1NF
A table is considered to be in 1NF if all the fields contain
only scalar values
Example (Not 1NF)
Pk_Int_Book_id Vchr_bookname Vchr_author
111 Basic Electrical and
Electronics
Engineering
Storey,Huggies,Tomasi
121 EVS Venugopal,Vinod
After performing 1NF
Pk_int_book_id Vchr_Bookname Vchr_author
111 Basic Electrical and
Electronics Engineering
Storey
111 Basic Electrical and
Electronics Engineering
Huggies
111 Basic Electrical and
Electronics Engineering
Thomasi
121 EVS Vinod
121 EVS Venugopal
Second Normal Form
For a table to be in 2NF, there are two requirements:
 The database is in first normal form
 All non_key attributes in the table must be functionally
dependent on the entire primary key
Second Normal Form- Example
Database not in 2NF:
Pk_Vchr_Emp_name Pk_Vchr_emp_desig Int_Emp_Sal Vchr_emp_address
Paul Manager 60000 121,PK
street,Mumbai
Ram Clerk 5000 111/114, Arumugam
street, Chennai
Primary key : {vchr_emp_name,vchr_emp_desig}
Here the employee salary is dependant on both primary keys employee address is
not dependant on employee designation. Hence it is not in 2NF
Second Normal Form- Example
Database after performing 2NF:
Pk_Vchr_Emp_n
ame
Pk_Vchr_emp_d
esig
Int_Emp_Sal
Paul Manager 60000
Ram Clerk 5000
Pk_Vchr_Emp_name Vchr_Emp_address
Paul 121,PK street,Mumbai
Ram 111/114, Arumugam street,
Chennai
THIRD NORMAL FORM
For a table to be in 3NF, there are two requirements:
 The table should be second normal form
 No attribute is transitively dependent on the primary key
All non key attributes of a table must be functionally dependent on
a candidate key.
There must be no interdependencies among non-key attributes
Third Normal Form- Example
Database not in 3NF:
Pk_int_stud_id Vchr_stud_name Int_class_id Vchr_class_name
3457 Ashish 101 CS5
4332 Abhay 121 EC6
Primary key : {pk_vchr_emp_name}
Here Student name , and class_id depends on primary key pk_int_stud_id.
The class name is but more dependant on the class_id (non-key) than stud_id.
So there is a transitive dependency. Hence not in 3NF.
Third Normal Form- Example
Database after performing 3NF:
Pk_int_stud_id Vchr_stud_name Int_class_id
3457 Ashish 101
4332 Abhay 121
Pk_Int_class_id Vchr_class_name
101 CS5
121 EC6
AN EXAMPLE TO SOLVE
Exam Management System
-----------------------------------
Users:
Admin
Student
Admin
---------
Login
View Profile
Edit Profile
Facility to manage student
Facility to manage exam
Student
----------
Attend exams
View mark
Let us first list the required tables:
Login_table
User_table
Exam_table
Exam_qstn_table
Qstn_option_table
Stud_answer_table
SOLVING THE PROBLEM
Pk_int_login_id Vchr_username Vchr_password
1 Administrator Admin
2 Ashish Ashish123
3 Abhay abhay123
Login_table
User_table
Pk_int_
user_id
Vchr_
Fname
Vchr_
Lname
Dat_dob Vchr_
place
Bln_status Vchr_user_
type
1 Pratap Nair 1867-05-01 Calicut 1 Admin
2 Ashish Prakash 1993-02-01 Banglore 1 Student
3 Abhay Anandh 1992-03-11 Chennai 1 Student
Pk_int_exam_id Vchr_exam_name int_exam_duration
(in hrs)
101 Basic C
programming Test
1
102 Cpp Evaluation test 1
Exam_table
Exam_qstn_table
Pk_int_qstn_id Fk_int_exam_id Vchr_question Vchr_answer Int_marks
1111 101 Code1 21 5
1112 101 Code2 11122133 10
1113 102 Code3 131 5
1114 102 Code4 3333 10
Question_option_table
Pk_int_option_id Fk_int_qstn_id Vchr_option
1 1111 21
2 1111 22
3 1111 25
4 1112 11122133
5 1112 0
6 1112 11100000
7 1113 131
8 1113 100
9 1113 1
10 1114 3333
11 1114 0
12 1114 2222
Student_answer_table
Pk_int_
answer_id
Fk_int_qstn_id fk_int_user_id Vchr_stud_
answer
Int_mark_
scored
116 1111 2 22 0
117 1112 2 11122133 10
118 1113 2 131 5
119 1114 2 3333 10
120 1111 3 21 5
121 1112 3 11122133 10
122 1113 3 131 5
123 1114 3 0 0
THANK YOU...
Want to learn more about programming or Looking to become a good programmer?
Are you wasting time on searching so many contents online?
Do you want to learn things quickly?
Tired of spending huge amount of money to become a Software professional?
Do an online course
@ baabtra.com
We put industry standards to practice. Our structured, activity based courses are so designed
to make a quick, good software professional out of anybody who holds a passion for coding.
Follow us @ twitter.com/baabtra
Like us @ facebook.com/baabtra
Subscribe to us @ youtube.com/baabtra
Become a follower @ slideshare.net/BaabtraMentoringPartner
Connect to us @ in.linkedin.com/in/baabtra
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Cafit Square,
Hilite Business Park,
Near Pantheerankavu,
Kozhikode
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

More Related Content

Viewers also liked

Normalisation muzz
Normalisation muzzNormalisation muzz
Normalisation muzz
muzzii27
 
Normalisation student summary
Normalisation student summaryNormalisation student summary
Normalisation student summary
mary_ramsay
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Ehsan Hamzei
 
Normalisation
NormalisationNormalisation
Normalisation
Forrester High School
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Rathan Raj
 
Normalization
NormalizationNormalization
Normalization
ochesing
 
Normalization
NormalizationNormalization
Normalization
Salman Memon
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
Jitendra Tomar
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Prateek Parimal
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
Jargalsaikhan Alyeksandr
 

Viewers also liked (11)

Normalisation muzz
Normalisation muzzNormalisation muzz
Normalisation muzz
 
Normalisation student summary
Normalisation student summaryNormalisation student summary
Normalisation student summary
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Normalisation
NormalisationNormalisation
Normalisation
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 

Similar to Database normalisation

Normalization in database
Normalization in databaseNormalization in database
Database normalization
Database normalizationDatabase normalization
Informatica_Level1_Flyer
Informatica_Level1_FlyerInformatica_Level1_Flyer
Informatica_Level1_Flyer
DATAPRO SERVICES
 
kats.ppt
kats.pptkats.ppt
kats.ppt
N.CH Karthik
 
Normalisation revision
Normalisation revisionNormalisation revision
Normalisation revision
Dr. Ramkumar Lakshminarayanan
 
10 sql tips
10 sql tips10 sql tips
10 sql tips
Yogui Osasuno
 
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Biplap Bhattarai
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
Oum Saokosal
 
Query processing
Query processingQuery processing
Query processing
Dr. C.V. Suresh Babu
 
Common SQL Performance Issues
Common SQL Performance  IssuesCommon SQL Performance  Issues
Common SQL Performance Issues
William Forney
 
Salesforce
SalesforceSalesforce
Salesforce
ZaranTech LLC
 
Linq in asp.net
Linq in asp.netLinq in asp.net
Chapter5.pptx
Chapter5.pptxChapter5.pptx
E learning resource locator, Synopsis
E learning resource locator, SynopsisE learning resource locator, Synopsis
E learning resource locator, Synopsis
Wipro
 
Intelligent query converter a domain independent interfacefor conversion
Intelligent query converter a domain independent interfacefor conversionIntelligent query converter a domain independent interfacefor conversion
Intelligent query converter a domain independent interfacefor conversion
IAEME Publication
 
IT6701-Information Management Unit 1
IT6701-Information Management Unit 1IT6701-Information Management Unit 1
IT6701-Information Management Unit 1
SIMONTHOMAS S
 
MTA database brochure
MTA database brochureMTA database brochure
MTA database brochure
NR Computer Learning Center
 
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docxSheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
lesleyryder69361
 
AMCAT
AMCATAMCAT
Advance Java course work under NCC Education June 2011
Advance Java course work  under NCC Education June 2011Advance Java course work  under NCC Education June 2011
Advance Java course work under NCC Education June 2011
Md. Mahbub Alam
 

Similar to Database normalisation (20)

Normalization in database
Normalization in databaseNormalization in database
Normalization in database
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Informatica_Level1_Flyer
Informatica_Level1_FlyerInformatica_Level1_Flyer
Informatica_Level1_Flyer
 
kats.ppt
kats.pptkats.ppt
kats.ppt
 
Normalisation revision
Normalisation revisionNormalisation revision
Normalisation revision
 
10 sql tips
10 sql tips10 sql tips
10 sql tips
 
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Query processing
Query processingQuery processing
Query processing
 
Common SQL Performance Issues
Common SQL Performance  IssuesCommon SQL Performance  Issues
Common SQL Performance Issues
 
Salesforce
SalesforceSalesforce
Salesforce
 
Linq in asp.net
Linq in asp.netLinq in asp.net
Linq in asp.net
 
Chapter5.pptx
Chapter5.pptxChapter5.pptx
Chapter5.pptx
 
E learning resource locator, Synopsis
E learning resource locator, SynopsisE learning resource locator, Synopsis
E learning resource locator, Synopsis
 
Intelligent query converter a domain independent interfacefor conversion
Intelligent query converter a domain independent interfacefor conversionIntelligent query converter a domain independent interfacefor conversion
Intelligent query converter a domain independent interfacefor conversion
 
IT6701-Information Management Unit 1
IT6701-Information Management Unit 1IT6701-Information Management Unit 1
IT6701-Information Management Unit 1
 
MTA database brochure
MTA database brochureMTA database brochure
MTA database brochure
 
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docxSheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
Sheet1Individual Needs Appointment for Hair StylingEmployee gr.docx
 
AMCAT
AMCATAMCAT
AMCAT
 
Advance Java course work under NCC Education June 2011
Advance Java course work  under NCC Education June 2011Advance Java course work  under NCC Education June 2011
Advance Java course work under NCC Education June 2011
 

More from baabtra.com - No. 1 supplier of quality freshers

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
baabtra.com - No. 1 supplier of quality freshers
 
Best coding practices
Best coding practicesBest coding practices
Core java - baabtra
Core java - baabtraCore java - baabtra
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
baabtra.com - No. 1 supplier of quality freshers
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
baabtra.com - No. 1 supplier of quality freshers
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
baabtra.com - No. 1 supplier of quality freshers
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php database connectivity
Php database connectivityPhp database connectivity
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Blue brain
Blue brainBlue brain
5g
5g5g
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Gd baabtra
Gd baabtraGd baabtra

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Recently uploaded

How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 

Recently uploaded (20)

How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 

Database normalisation

  • 1.
  • 3. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 4. DATABASE NORMALIZATION LEVELS OF NORMALIZATION SOLVED EXAMPLE
  • 5. DATABASE NORMALIZATION What is normalization???? Why normalize the database??? Strength and drawback of normalization..!!!
  • 6. What is actually normalization??? The process of analyzing a given relational schema based on their functional dependencies and primary keys.
  • 7. Why normalize database???? Minimizing redundancy Accuracy Performance
  • 8. Strength And Drawback of Databases...!!!! Strength: Reduces Redundancy Reduces errors Drawback: No of tables increases Complexity increases
  • 10. FIRST NORMAL FORM-1NF A table is considered to be in 1NF if all the fields contain only scalar values Example (Not 1NF) Pk_Int_Book_id Vchr_bookname Vchr_author 111 Basic Electrical and Electronics Engineering Storey,Huggies,Tomasi 121 EVS Venugopal,Vinod
  • 11. After performing 1NF Pk_int_book_id Vchr_Bookname Vchr_author 111 Basic Electrical and Electronics Engineering Storey 111 Basic Electrical and Electronics Engineering Huggies 111 Basic Electrical and Electronics Engineering Thomasi 121 EVS Vinod 121 EVS Venugopal
  • 12. Second Normal Form For a table to be in 2NF, there are two requirements:  The database is in first normal form  All non_key attributes in the table must be functionally dependent on the entire primary key
  • 13. Second Normal Form- Example Database not in 2NF: Pk_Vchr_Emp_name Pk_Vchr_emp_desig Int_Emp_Sal Vchr_emp_address Paul Manager 60000 121,PK street,Mumbai Ram Clerk 5000 111/114, Arumugam street, Chennai Primary key : {vchr_emp_name,vchr_emp_desig} Here the employee salary is dependant on both primary keys employee address is not dependant on employee designation. Hence it is not in 2NF
  • 14. Second Normal Form- Example Database after performing 2NF: Pk_Vchr_Emp_n ame Pk_Vchr_emp_d esig Int_Emp_Sal Paul Manager 60000 Ram Clerk 5000 Pk_Vchr_Emp_name Vchr_Emp_address Paul 121,PK street,Mumbai Ram 111/114, Arumugam street, Chennai
  • 15. THIRD NORMAL FORM For a table to be in 3NF, there are two requirements:  The table should be second normal form  No attribute is transitively dependent on the primary key All non key attributes of a table must be functionally dependent on a candidate key. There must be no interdependencies among non-key attributes
  • 16. Third Normal Form- Example Database not in 3NF: Pk_int_stud_id Vchr_stud_name Int_class_id Vchr_class_name 3457 Ashish 101 CS5 4332 Abhay 121 EC6 Primary key : {pk_vchr_emp_name} Here Student name , and class_id depends on primary key pk_int_stud_id. The class name is but more dependant on the class_id (non-key) than stud_id. So there is a transitive dependency. Hence not in 3NF.
  • 17. Third Normal Form- Example Database after performing 3NF: Pk_int_stud_id Vchr_stud_name Int_class_id 3457 Ashish 101 4332 Abhay 121 Pk_Int_class_id Vchr_class_name 101 CS5 121 EC6
  • 18. AN EXAMPLE TO SOLVE Exam Management System ----------------------------------- Users: Admin Student Admin --------- Login View Profile Edit Profile Facility to manage student Facility to manage exam Student ---------- Attend exams View mark
  • 19. Let us first list the required tables: Login_table User_table Exam_table Exam_qstn_table Qstn_option_table Stud_answer_table SOLVING THE PROBLEM
  • 20. Pk_int_login_id Vchr_username Vchr_password 1 Administrator Admin 2 Ashish Ashish123 3 Abhay abhay123 Login_table User_table Pk_int_ user_id Vchr_ Fname Vchr_ Lname Dat_dob Vchr_ place Bln_status Vchr_user_ type 1 Pratap Nair 1867-05-01 Calicut 1 Admin 2 Ashish Prakash 1993-02-01 Banglore 1 Student 3 Abhay Anandh 1992-03-11 Chennai 1 Student
  • 21. Pk_int_exam_id Vchr_exam_name int_exam_duration (in hrs) 101 Basic C programming Test 1 102 Cpp Evaluation test 1 Exam_table Exam_qstn_table Pk_int_qstn_id Fk_int_exam_id Vchr_question Vchr_answer Int_marks 1111 101 Code1 21 5 1112 101 Code2 11122133 10 1113 102 Code3 131 5 1114 102 Code4 3333 10
  • 22. Question_option_table Pk_int_option_id Fk_int_qstn_id Vchr_option 1 1111 21 2 1111 22 3 1111 25 4 1112 11122133 5 1112 0 6 1112 11100000 7 1113 131 8 1113 100 9 1113 1 10 1114 3333 11 1114 0 12 1114 2222
  • 23. Student_answer_table Pk_int_ answer_id Fk_int_qstn_id fk_int_user_id Vchr_stud_ answer Int_mark_ scored 116 1111 2 22 0 117 1112 2 11122133 10 118 1113 2 131 5 119 1114 2 3333 10 120 1111 3 21 5 121 1112 3 11122133 10 122 1113 3 131 5 123 1114 3 0 0
  • 25. Want to learn more about programming or Looking to become a good programmer? Are you wasting time on searching so many contents online? Do you want to learn things quickly? Tired of spending huge amount of money to become a Software professional? Do an online course @ baabtra.com We put industry standards to practice. Our structured, activity based courses are so designed to make a quick, good software professional out of anybody who holds a passion for coding.
  • 26. Follow us @ twitter.com/baabtra Like us @ facebook.com/baabtra Subscribe to us @ youtube.com/baabtra Become a follower @ slideshare.net/BaabtraMentoringPartner Connect to us @ in.linkedin.com/in/baabtra Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 27. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Cafit Square, Hilite Business Park, Near Pantheerankavu, Kozhikode Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com