SlideShare a Scribd company logo
2nd
Normal Form
A relation schema is in 2NF if it
satisfies 1NF and every non key
attribute is fully functionally
dependent on the primary key of
Relation.
Example of 2NF
EMP_PROJ is 1NF with Key SSN, PNUMBER but…
 SSN  ENAME - ENAME, a Non-Prime Attribute, Depends Partially
on SSN, PNUMBER, i.e., Depends on Only SSN and not Both
 PNUMBER  {PNAME, PLOCATION} - PNAME, PLOCATION, two
Non-Prime Attributes, Depends Partially on SSN, Pno i.e., Depends
on Only PNo &not Both
Another Example of 2NF
Third Normal Form (3NF)
It is based on the concept of
transitive dependency. A functional
dependency XY in a relation
schema R is a transitive dependency
if there is a set of attributes Z that is
neither a candidate key nor a subset
of any key of R, and both XZ and
ZY hold.( Book Def)
EMP_DEPT
ENAME SSN BDATE ADDRESS DNUMBER DNAME DMGRSS
N
Here, SSNDNAME
Since SSNDNUMBER and
DNUMBERDNAME holds.
A relation schema R is said to be in 3NF if it
satisfies 2NF and no nonprime attribute of R is
transitively dependent on the Primary key. To
normalize from 2NF to 3NF, decompose and
set up a relation that includes the non-prime
attribute that functionally determine other
non-prime attribute and remove this attribute
from the original relation.
Relation Schema EMP_DEPT is not in 3NF but it
is in 2NF as no partial dependency on a key
exists.
To normalize EMP_DEPT into 3NF we
decompose it into two 3NF relation
schemas as shown:
ENAME SSN BDATE ADDRESS DNUMBER DNAME DMGRSS
N
ENAME SSN BDAT
E
ADDRESS DNUMBE
R
DNUMBE
R
DNAME DMGRSS
N
ED1
ED2
Consider a LOTS relation schema that
describes plots for sale in various states of
countries .
It has two candidate keys PROPERTY_ID#
and {COUNTRY_NAME,LOT#}.
Also we assume that tax rate is determined
by country name. Also price of a lot is
determined by it’s area.
PROPERTY
_ID#
COUNTRY_N
AME
LOT# AREA PRICE TAX_RATE
Determine all FDs.
And Normalise the
relation schema to
3rd
Normal Form.
PROPERTY
_ID#
COUNTRY_N
AME
LOT# AREA PRICE TAX_RATE
FD1
FD2
FD3
FD4
Decomposition into 2NF
LOTS1
PROPERTY
_ID#
COUNTRY_N
AME
LOT# AREA PRICE
LOTS2
COUNTRY_NAM
E
TAX_RATE
Normalizing LOTS1 into 3NF
(lots 2 will remain as it is)
PROPERTY
_ID#
COUNTRY_NAME LOT# AREA
LOTS1A
LOTS1B
AREA PRICE
Boyce-Codd Normal Form
A relation is in BCNF if and only if every
nontrivial, left-irreducible FD has a
candidate key as it’s determinant. Hence,
for every nontrivial, left-irreducible FD
XA, X should be a candidate key. The
difference between 3NF and BCNF is that
3NF allows A to be a prime attribute.
Every relation that in BCNF is also in 3NF,
however a relation in 3NF is not necessarily
in BCNF.For example,
In simple terms
Normalisation of something i dont know and will never know
Superkey
Normalisation of something i dont know and will never know
Normalisation of something i dont know and will never know
Normalisation of something i dont know and will never know
4 NF
Fourth normal form (4NF) is a level of
database normalization where there
are no non-trivial multivalued
dependencies other than a candidate
key. It builds on the first three normal
forms (1NF, 2NF and 3NF) and the
Boyce-Codd Normal Form (BCNF
Properties :
A relation R is in 4NF if and only if the
following conditions are satisfied:
1.It should be in the Boyce-Codd
Normal Form (BCNF).
2.the table should not have any Multi-
valued Dependency.
A table with a multivalued dependency
violates the normalization standard of
Fourth Normal Form (4NK) because it
creates unnecessary redundancies and
can contribute to inconsistent data. To
bring this up to 4NF, it is necessary to
break this information into two tables.
example
SID SNAME
S1 A
S2 B
Table – R1(SID, SNAME)
Table – R2(CID, CNAME)
CID CNAME
C1 C
C2 D
SID SNAME CID CNAME
S1 A C1 C
S1 A C2 D
S2 B C1 C
S2 B C2 D
Multivalued dependencies (MVD) are:
SID->->CID; SID->->CNAME; SNAME->->CNAME
Normal Form (5NF):
A relation R is in 5NF if and only if
every join dependency in R is implied
by the candidate keys of R. A relation
decomposed into two relations must
have loss-less join Property, which
ensures that no spurious or extra
tuples are generated, when relations
are reunited through a natural join.
Properties – A relation R is in 5NF if
and only if it satisfies following
conditions:
1.R should be already in 4NF.
2.It cannot be further non loss
decomposed (join dependency)
Agent Company Product
A1 PQR Nut
A1 PQR Bolt
A1 XYZ Nut
Table – ACP
The relation ACP is again decompose into 3 relations. Now, the natural
Join of all the three relations will be shown as:
Agent Company
A1 PQR
A1 XYZ
A2 PQR
Table – R1
Agent Product
A1 Nut
A1 Bolt
A2 Nut
able – R2
Table R3
Company Product
PQR Nut
PQR Bolt
XYZ Nut
XYZ Bolt
Result of Natural Join of R1 and R3 over
‘Company’ and then Natural Join of R13 and
R2 over ‘Agent’and ‘Product’ will be
table ACP.
Hence, in this example, all the redundancies
are eliminated, and the decomposition of
ACP is a lossless join decomposition.
Therefore, the relation is in 5NF as it does
not violate the property of lossless join.

More Related Content

PPT
Chapter10
PPTX
Normal forms & Normalization.pptx
PDF
eaxmple of Normalisation
PDF
Database management system session 5
PPTX
Normalization.pptx Functional dependence
PPT
Normalization_dsa_project_easy_with_graph.ppt
PPT
Normalization
PPTX
Learn more about database normalization concepts
Chapter10
Normal forms & Normalization.pptx
eaxmple of Normalisation
Database management system session 5
Normalization.pptx Functional dependence
Normalization_dsa_project_easy_with_graph.ppt
Normalization
Learn more about database normalization concepts

Similar to Normalisation of something i dont know and will never know (20)

PPTX
Normalization
PPT
Function Dependencies and Normalization
PPTX
chapter_8.pptx
PDF
Normalization in DBMS
PDF
Types of normalization
PPT
Chuẩn hóa CSDL
PPTX
Normalization
PDF
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
PPT
Normalization(15.09.2010)
PPT
PPT
Functional Dependencies and Normalization with well explained examples and pr...
PPT
Cross-reference or relationship relation optionAdditional01.ppt
PPTX
Fd & Normalization - Database Management System
PPTX
Normalization
PPT
Normal forms.ppt
PPTX
CC03_FDAnnnnnnnnnnnnnnnnnnnnnndNoon.pptx
PDF
L9 design2
PPT
database management systems presents.ppt
PPTX
Functional dependencies and normalization
Normalization
Function Dependencies and Normalization
chapter_8.pptx
Normalization in DBMS
Types of normalization
Chuẩn hóa CSDL
Normalization
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
Normalization(15.09.2010)
Functional Dependencies and Normalization with well explained examples and pr...
Cross-reference or relationship relation optionAdditional01.ppt
Fd & Normalization - Database Management System
Normalization
Normal forms.ppt
CC03_FDAnnnnnnnnnnnnnnnnnnnnnndNoon.pptx
L9 design2
database management systems presents.ppt
Functional dependencies and normalization
Ad

Recently uploaded (20)

PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PPTX
Virtual and Augmented Reality in Current Scenario
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
IGGE1 Understanding the Self1234567891011
PPTX
Introduction to Building Materials
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
1_English_Language_Set_2.pdf probationary
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
History, Philosophy and sociology of education (1).pptx
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Share_Module_2_Power_conflict_and_negotiation.pptx
Virtual and Augmented Reality in Current Scenario
Chinmaya Tiranga quiz Grand Finale.pdf
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Indian roads congress 037 - 2012 Flexible pavement
FORM 1 BIOLOGY MIND MAPS and their schemes
IGGE1 Understanding the Self1234567891011
Introduction to Building Materials
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
B.Sc. DS Unit 2 Software Engineering.pptx
1_English_Language_Set_2.pdf probationary
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
History, Philosophy and sociology of education (1).pptx
Ad

Normalisation of something i dont know and will never know

  • 1. 2nd Normal Form A relation schema is in 2NF if it satisfies 1NF and every non key attribute is fully functionally dependent on the primary key of Relation.
  • 2. Example of 2NF EMP_PROJ is 1NF with Key SSN, PNUMBER but…  SSN  ENAME - ENAME, a Non-Prime Attribute, Depends Partially on SSN, PNUMBER, i.e., Depends on Only SSN and not Both  PNUMBER  {PNAME, PLOCATION} - PNAME, PLOCATION, two Non-Prime Attributes, Depends Partially on SSN, Pno i.e., Depends on Only PNo &not Both
  • 4. Third Normal Form (3NF) It is based on the concept of transitive dependency. A functional dependency XY in a relation schema R is a transitive dependency if there is a set of attributes Z that is neither a candidate key nor a subset of any key of R, and both XZ and ZY hold.( Book Def)
  • 5. EMP_DEPT ENAME SSN BDATE ADDRESS DNUMBER DNAME DMGRSS N
  • 6. Here, SSNDNAME Since SSNDNUMBER and DNUMBERDNAME holds.
  • 7. A relation schema R is said to be in 3NF if it satisfies 2NF and no nonprime attribute of R is transitively dependent on the Primary key. To normalize from 2NF to 3NF, decompose and set up a relation that includes the non-prime attribute that functionally determine other non-prime attribute and remove this attribute from the original relation. Relation Schema EMP_DEPT is not in 3NF but it is in 2NF as no partial dependency on a key exists.
  • 8. To normalize EMP_DEPT into 3NF we decompose it into two 3NF relation schemas as shown:
  • 9. ENAME SSN BDATE ADDRESS DNUMBER DNAME DMGRSS N ENAME SSN BDAT E ADDRESS DNUMBE R DNUMBE R DNAME DMGRSS N ED1 ED2
  • 10. Consider a LOTS relation schema that describes plots for sale in various states of countries . It has two candidate keys PROPERTY_ID# and {COUNTRY_NAME,LOT#}. Also we assume that tax rate is determined by country name. Also price of a lot is determined by it’s area.
  • 11. PROPERTY _ID# COUNTRY_N AME LOT# AREA PRICE TAX_RATE Determine all FDs. And Normalise the relation schema to 3rd Normal Form.
  • 13. Decomposition into 2NF LOTS1 PROPERTY _ID# COUNTRY_N AME LOT# AREA PRICE LOTS2 COUNTRY_NAM E TAX_RATE
  • 14. Normalizing LOTS1 into 3NF (lots 2 will remain as it is) PROPERTY _ID# COUNTRY_NAME LOT# AREA LOTS1A LOTS1B AREA PRICE
  • 15. Boyce-Codd Normal Form A relation is in BCNF if and only if every nontrivial, left-irreducible FD has a candidate key as it’s determinant. Hence, for every nontrivial, left-irreducible FD XA, X should be a candidate key. The difference between 3NF and BCNF is that 3NF allows A to be a prime attribute. Every relation that in BCNF is also in 3NF, however a relation in 3NF is not necessarily in BCNF.For example,
  • 22. 4 NF Fourth normal form (4NF) is a level of database normalization where there are no non-trivial multivalued dependencies other than a candidate key. It builds on the first three normal forms (1NF, 2NF and 3NF) and the Boyce-Codd Normal Form (BCNF
  • 23. Properties : A relation R is in 4NF if and only if the following conditions are satisfied: 1.It should be in the Boyce-Codd Normal Form (BCNF). 2.the table should not have any Multi- valued Dependency.
  • 24. A table with a multivalued dependency violates the normalization standard of Fourth Normal Form (4NK) because it creates unnecessary redundancies and can contribute to inconsistent data. To bring this up to 4NF, it is necessary to break this information into two tables.
  • 25. example SID SNAME S1 A S2 B Table – R1(SID, SNAME) Table – R2(CID, CNAME)
  • 27. SID SNAME CID CNAME S1 A C1 C S1 A C2 D S2 B C1 C S2 B C2 D Multivalued dependencies (MVD) are: SID->->CID; SID->->CNAME; SNAME->->CNAME
  • 28. Normal Form (5NF): A relation R is in 5NF if and only if every join dependency in R is implied by the candidate keys of R. A relation decomposed into two relations must have loss-less join Property, which ensures that no spurious or extra tuples are generated, when relations are reunited through a natural join.
  • 29. Properties – A relation R is in 5NF if and only if it satisfies following conditions: 1.R should be already in 4NF. 2.It cannot be further non loss decomposed (join dependency)
  • 30. Agent Company Product A1 PQR Nut A1 PQR Bolt A1 XYZ Nut Table – ACP
  • 31. The relation ACP is again decompose into 3 relations. Now, the natural Join of all the three relations will be shown as: Agent Company A1 PQR A1 XYZ A2 PQR Table – R1
  • 32. Agent Product A1 Nut A1 Bolt A2 Nut able – R2
  • 33. Table R3 Company Product PQR Nut PQR Bolt XYZ Nut XYZ Bolt
  • 34. Result of Natural Join of R1 and R3 over ‘Company’ and then Natural Join of R13 and R2 over ‘Agent’and ‘Product’ will be table ACP. Hence, in this example, all the redundancies are eliminated, and the decomposition of ACP is a lossless join decomposition. Therefore, the relation is in 5NF as it does not violate the property of lossless join.