0% found this document useful (0 votes)
21 views8 pages

Normal Forms

rdbms normal forms
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views8 pages

Normal Forms

rdbms normal forms
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

NORMAL FORMS

BCNF
BOYCE CODD NORMAL FORM

BCNF (Boyce Codd Normal Form) is an advanced


version of the third normal form (3NF), and often, it is
also known as the 3.5 Normal Form.

A relation is said to be in BCNF in DBMS if the relation


is already in 3NF, and also, for every functional
dependency (say, X->Y), X is either the super key or
the candidate key. In simple terms, X can't be a non-
prime attribute.
RULES FOR BCNF
Rules for BCNF in DBMS
A table or relation is said to be in BCNF (Boyce
Codd Normal Form) if it satisfies the following two
conditions that we have already studied in its
definition:
It should satisfy all the conditions of the Third
Normal Form (3NF).
For any functional dependency (A->B), A should be
either the super key or the candidate key. In simple
words, it means that A can't be a non-prime
attribute if B is given as a prime attribute.
BCNF
In this example, we have a relation R with three
columns: Id, Subject, and Professor.
We have to find the highest normalization form,
and also, if it is not in BCNF, we have to decompose
it to satisfy the conditions of BCNF.
ID SUBJECT PROFESSOR

101 JAVA MAYANK

101 C++ KARTHIK

102 JAVA SATYA

103 C## LAKSHAY

104 JAVA MAYANK


BCNF

Using Id and Subject together, we can find all unique


records and also the other columns of the table.
Hence, the Id and Subject together form the primary key.
As we know that each professor teaches only one subject,
but one subject may be taught by multiple professors.
This shows that there is a dependency between the subject
& the professor, and the subject is always dependent on
the professor (professor -> subject).
As we know that the professor column is a non-prime
attribute, while the subject is a prime attribute.
This is not allowed in BCNF in DBMS. For BCNF, the deriving
attribute (professor here) must be a prime attribute.
After BCNF
P_ID S_ID PROFESSOR
1 101 MAYANK
2 101 KARTIK
3 102 SATYA
4 103 LAKSHAY
5 104 MAYANK

Professor Subject
MAYANK JAVA
KARTIK C++
SATYA JAVA
LAKSHAY C##
MAYANK JAVA
FOURTH NORMAL FORM
Consider the database table of a class which has
two relations R1 contains student ID(SID) and
student name (SNAME) and R2 contains course
id(CID) and course name (CNAME). Multi-Valued
Dependency
Table – R1(SID, SNAME)
SID SNAME
1 A
2 B

CID CNAME
C1 C
C2 D
FIFTH NORMAL FORM
A relation R is in 5NF if and only if it satisfies following
conditions:
R should be already in 4NF.
It cannot be further non loss decomposed (join
dependency)
Agent Company Product
A1 PQR NUT
A2 PQR BOLT
A1 XYZ NUT
A1 XYZ BOLT

All the redundancies are eliminated, and the


decomposition of ACP is a lossless join decomposition.

You might also like