SlideShare a Scribd company logo
1 of 18
NORMAL FORMS
TUESDAY, OCTOBER 18, 2016
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.
Characteristics of
normalization includes:
1. The minimal number of attributes necessary to
support the data requirements of the enterprise.
2. Attributes with a close logical relationship are
found in the same relation.
3. Minimal redundancy with each attribute
represented only once with important exception
of attributes that form all or part of foreign keys.
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/table.
3. Identify each set of related data/table with a primary key
The following scenario illustrates how a
database design might violate first normal
form.
Customer
Customer ID First Name Surname
Telephone
Number
123 Pooja Patel
555-861-2025,
192-122-1111
456 Zhang San
(555) 403-1659
Ext. 53; 182-929-
2929
789 John Doe 555-808-9633
A design that complies with
1NORMAL FORM
Customer
Customer ID First Name Surname
Telephone
Number
123 Pooja Patel 555-861-2025
123 Pooja Patel 192-122-1111
456 Zhang San 182-929-2929
456 Zhang San
(555) 403-1659
Ext. 53
789 John Doe 555-808-9633
A design that also complies
with higher normal forms
Customer Name
Customer ID First Name Surname
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.
2NF enforces these criteria:
1. Remove subsets of data that apply to multiple rows of a
table and place them in separate tables.
2. Create relationship between these new tables and their
predecessors through the use of foreign key.
A VIOLATION OF 2NF
Electric Toothbrush Models
Manufacturer Model Model Full Name
Manufacturer
Country
Forte X-Prime Forte X-Prime Italy
Forte Ultraclean Forte Ultraclean Italy
Dent-o-Fresh EZbrush
Dent-o-Fresh
EZbrush
USA
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
Manufacturer Model Model Full Name
Forte X-Prime Forte X-Prime
Forte Ultraclean Forte Ultraclean
Dent-o-Fresh EZbrush
Dent-o-Fresh
EZbrush
Kobayashi ST-60 Kobayashi ST-60
Hoch Toothmaster
Hoch
Toothmaster
Hoch X-Prime Hoch X-Prime
Third normal form (3NF)
Third Normal form applies that every non-prime
attribute of a table must be dependent on primary
key.
3NF enforces the following criteria:
1. That the table must conform to both 1NF and
2NF
2. Remove columns that are not fully dependent
on the primary key
3. Create relationship between these new tables
and their predecessors through the use of
foreign key.
For example, consider a table with the following
fields:
Student_Detail Table
Student_id Student_name DOB Street city State Zip
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 is achieved.
ASSIGNMENT
1. Read up: “ Entity-Relationship model”.
2. Explain the differences between primary, candidate
and foreign keys.
Terminologies:
1. A superkey is defined in the relational model of database
organization as a set of attributes of a relation variable for
which it holds that in all relations assigned to that variable,
there are no two distinct tuples (rows) that have the same
values for the attributes in this set.
2. Candidate key – is a minimal superkey for a relation in a
table.
3. Foreign key – is a field in a relational table that matches a
candidate key of another table.
4. Normalization –
5. Anomalies – irregularities, variance, abnormalities etc.
6. Inconsistencies – discrepancies, contradictions etc.
7. Redundancies – severances, joblessness, dismissals etc.

More Related Content

What's hot

What's hot (20)

Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
DATABASE CONSTRAINTS
DATABASE CONSTRAINTSDATABASE CONSTRAINTS
DATABASE CONSTRAINTS
 
Normalization
NormalizationNormalization
Normalization
 
normaliztion
normaliztionnormaliztion
normaliztion
 
Normalization
NormalizationNormalization
Normalization
 
Functional dependencies in Database Management System
Functional dependencies in Database Management SystemFunctional dependencies in Database Management System
Functional dependencies in Database Management System
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Relational model
Relational modelRelational model
Relational model
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization
 
Decomposition using Functional Dependency
Decomposition using Functional DependencyDecomposition using Functional Dependency
Decomposition using Functional Dependency
 
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
 
Anomalies in database
Anomalies in databaseAnomalies in database
Anomalies in database
 
Normalization in SQL | Edureka
Normalization in SQL | EdurekaNormalization in SQL | Edureka
Normalization in SQL | Edureka
 
Normalization
NormalizationNormalization
Normalization
 
Referential integrity
Referential integrityReferential integrity
Referential integrity
 

Viewers also liked

善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1Yi-Feng Tzeng
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramRakhi Mukherji
 
Rdbms
RdbmsRdbms
Rdbmsrdbms
 
Types of databases
Types of databasesTypes of databases
Types of databasesPAQUIAAIZEL
 

Viewers also liked (7)

善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
善用 MySQL 及 PostgreSQL - RDBMS 的逆襲 - part1
 
ER Model in DBMS
ER Model in DBMSER Model in DBMS
ER Model in DBMS
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Rdbms
RdbmsRdbms
Rdbms
 
Types of databases
Types of databasesTypes of databases
Types of databases
 
Basic DBMS ppt
Basic DBMS pptBasic DBMS ppt
Basic DBMS ppt
 
Dbms slides
Dbms slidesDbms slides
Dbms slides
 

Similar to Normal forms

Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016Dave Stokes
 
Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal formcollege
 
Ism normalization pine valley 2012
Ism normalization pine valley 2012Ism normalization pine valley 2012
Ism normalization pine valley 2012Akshit R Shah
 
Lecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptxLecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptxAsadkhan47384
 
Normalization by Ashwin and Tanmay
Normalization by Ashwin and TanmayNormalization by Ashwin and Tanmay
Normalization by Ashwin and TanmayAshwin Dinoriya
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptxkshipra sony
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationNickkisha Farrell
 
databaess.pptx
databaess.pptxdatabaess.pptx
databaess.pptxJanoakre
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Futureijtsrd
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesnsrChowdary1
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
Distributed database
Distributed databaseDistributed database
Distributed databaseNasIr Irshad
 

Similar to Normal forms (20)

Database normalization
Database normalizationDatabase normalization
Database normalization
 
Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016
 
Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal form
 
Ism normalization pine valley 2012
Ism normalization pine valley 2012Ism normalization pine valley 2012
Ism normalization pine valley 2012
 
Normalization
NormalizationNormalization
Normalization
 
Lecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptxLecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptx
 
Normalization
NormalizationNormalization
Normalization
 
Normalization by Ashwin and Tanmay
Normalization by Ashwin and TanmayNormalization by Ashwin and Tanmay
Normalization by Ashwin and Tanmay
 
Normalization
NormalizationNormalization
Normalization
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
 
Normalization
NormalizationNormalization
Normalization
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
 
databaess.pptx
databaess.pptxdatabaess.pptx
databaess.pptx
 
Research gadot
Research gadotResearch gadot
Research gadot
 
Faq dbms
Faq dbmsFaq dbms
Faq dbms
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
 
Dependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its typesDependencies in various topics like normalisation and its types
Dependencies in various topics like normalisation and its types
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Distributed database
Distributed databaseDistributed database
Distributed database
 

More from Samuel Igbanogu

More from Samuel Igbanogu (17)

Systems development cycle
Systems development cycleSystems development cycle
Systems development cycle
 
Data conversion
Data conversionData conversion
Data conversion
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Classification of computers with respect to size
Classification of computers with respect to sizeClassification of computers with respect to size
Classification of computers with respect to size
 
Classification of computers by type
Classification of computers by typeClassification of computers by type
Classification of computers by type
 
Classification of computers by generation
Classification of computers by generationClassification of computers by generation
Classification of computers by generation
 
File organisation
File organisationFile organisation
File organisation
 
Computer system soft ware
Computer system soft wareComputer system soft ware
Computer system soft ware
 
Relational models
Relational modelsRelational models
Relational models
 
Handling computer files
Handling computer filesHandling computer files
Handling computer files
 
Entity relationship model
Entity relationship modelEntity relationship model
Entity relationship model
 
Output devices
Output devicesOutput devices
Output devices
 
Concept of computer files
Concept of computer filesConcept of computer files
Concept of computer files
 
Computing devices i
Computing devices iComputing devices i
Computing devices i
 
Logic gates i & ii
Logic gates i & iiLogic gates i & ii
Logic gates i & ii
 
Input devices
Input devicesInput devices
Input devices
 
Data models
Data modelsData models
Data models
 

Recently uploaded

Welcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayWelcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayZachary Labe
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫qfactory1
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsssuserddc89b
 
TOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptxTOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptxdharshini369nike
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsHajira Mahmood
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.PraveenaKalaiselvan1
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
insect anatomy and insect body wall and their physiology
insect anatomy and insect body wall and their  physiologyinsect anatomy and insect body wall and their  physiology
insect anatomy and insect body wall and their physiologyDrAnita Sharma
 
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...lizamodels9
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |aasikanpl
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
‏‏VIRUS - 123455555555555555555555555555555555555555
‏‏VIRUS -  123455555555555555555555555555555555555555‏‏VIRUS -  123455555555555555555555555555555555555555
‏‏VIRUS - 123455555555555555555555555555555555555555kikilily0909
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 

Recently uploaded (20)

Welcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayWelcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work Day
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physics
 
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort ServiceHot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
 
TOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptxTOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptx
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutions
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
insect anatomy and insect body wall and their physiology
insect anatomy and insect body wall and their  physiologyinsect anatomy and insect body wall and their  physiology
insect anatomy and insect body wall and their physiology
 
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Lajpat Nagar (Delhi) |
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
‏‏VIRUS - 123455555555555555555555555555555555555555
‏‏VIRUS -  123455555555555555555555555555555555555555‏‏VIRUS -  123455555555555555555555555555555555555555
‏‏VIRUS - 123455555555555555555555555555555555555555
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 

Normal forms

  • 2. 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
  • 3. 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.
  • 4. 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.
  • 5. Characteristics of normalization includes: 1. The minimal number of attributes necessary to support the data requirements of the enterprise. 2. Attributes with a close logical relationship are found in the same relation. 3. Minimal redundancy with each attribute represented only once with important exception of attributes that form all or part of foreign keys.
  • 6. 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/table. 3. Identify each set of related data/table with a primary key
  • 7. The following scenario illustrates how a database design might violate first normal form. Customer Customer ID First Name Surname Telephone Number 123 Pooja Patel 555-861-2025, 192-122-1111 456 Zhang San (555) 403-1659 Ext. 53; 182-929- 2929 789 John Doe 555-808-9633
  • 8. A design that complies with 1NORMAL FORM Customer Customer ID First Name Surname Telephone Number 123 Pooja Patel 555-861-2025 123 Pooja Patel 192-122-1111 456 Zhang San 182-929-2929 456 Zhang San (555) 403-1659 Ext. 53 789 John Doe 555-808-9633
  • 9. A design that also complies with higher normal forms Customer Name Customer ID First Name Surname 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
  • 10. 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. 2NF enforces these criteria: 1. Remove subsets of data that apply to multiple rows of a table and place them in separate tables. 2. Create relationship between these new tables and their predecessors through the use of foreign key.
  • 11. A VIOLATION OF 2NF Electric Toothbrush Models Manufacturer Model Model Full Name Manufacturer Country Forte X-Prime Forte X-Prime Italy Forte Ultraclean Forte Ultraclean Italy Dent-o-Fresh EZbrush Dent-o-Fresh EZbrush USA Kobayashi ST-60 Kobayashi ST-60 Japan Hoch Toothmaster Hoch Toothmaster Germany Hoch X-Prime Hoch X-Prime Germany
  • 12. 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:
  • 13. Electric Toothbrush Manufacturers Manufacturer Manufacturer Country Forte Italy Dent-o-Fresh USA Kobayashi Japan Hoch Germany Electric Toothbrush Models Manufacturer Model Model Full Name Forte X-Prime Forte X-Prime Forte Ultraclean Forte Ultraclean Dent-o-Fresh EZbrush Dent-o-Fresh EZbrush Kobayashi ST-60 Kobayashi ST-60 Hoch Toothmaster Hoch Toothmaster Hoch X-Prime Hoch X-Prime
  • 14. Third normal form (3NF) Third Normal form applies that every non-prime attribute of a table must be dependent on primary key. 3NF enforces the following criteria: 1. That the table must conform to both 1NF and 2NF 2. Remove columns that are not fully dependent on the primary key 3. Create relationship between these new tables and their predecessors through the use of foreign key. For example, consider a table with the following fields:
  • 15. Student_Detail Table Student_id Student_name DOB Street city State Zip 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
  • 16. The advantage of removing transitive dependency is, 1. Amount of data duplication is reduced. 2. Data integrity is achieved.
  • 17. ASSIGNMENT 1. Read up: “ Entity-Relationship model”. 2. Explain the differences between primary, candidate and foreign keys.
  • 18. Terminologies: 1. A superkey is defined in the relational model of database organization as a set of attributes of a relation variable for which it holds that in all relations assigned to that variable, there are no two distinct tuples (rows) that have the same values for the attributes in this set. 2. Candidate key – is a minimal superkey for a relation in a table. 3. Foreign key – is a field in a relational table that matches a candidate key of another table. 4. Normalization – 5. Anomalies – irregularities, variance, abnormalities etc. 6. Inconsistencies – discrepancies, contradictions etc. 7. Redundancies – severances, joblessness, dismissals etc.

Editor's Notes

  1. A functional dependency on part of any candidate key is a violation of 2NF. In addition to the primary key, the table may contain other candidate keys; it is necessary to establish that no non-prime attributes have part-key dependencies on any of these candidate keys. Multiple candidate keys occur in the following table: