Sanjivani Rural Education Society’s
Sanjivani College of Engineering, Kopargaon-423 603
(An Autonomous Institute, Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Computer Engineering
(NBA Accredited)
Prof. Monika Agrawal
Assistant Professor
E-mail : agrawalmonikacomp@sanjivani.org.in
Contact No: 8770361037
Course:CO210
Database Management System
Lecture-05 3NF BCNF
Content
s
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 2
Normalization Rule
Purpose of Normalization
3 NF
BCNF
Normalization Rule
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 3
Normalization is a process of organizing the data in database to avoid
data redundancy, insertion anomaly, update anomaly & deletion
anomaly.
Normalization is systematic approach of decomposing tables to
eliminate data redundancy.
Normalization rules are divided into the following normal
forms:
First Normal Form
Second Normal Form
Third Normal Form
BCNF
Purpose of Normalization
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 4
Eliminating redundant (useless) data.
Ensuring data dependencies make sense i.e data is logically stored.
3NF
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 5
Table must be in 2NF.
Every non prime attribute of table must be dependent on Primary
Key.
There should not be case that a non prime attribute is determined by
another non prime attribute. This transitive functional dependency
should be removed from table.
3NF (Cont.)
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 6
Example:- Student Table
In above table Student_Id is Primary key but Street, City and State
depends on 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 a Primary Key.
After 3NF:- Two tables
Student_Id Student_Name DOB Street City State Zip
Student_Id Student_Name DOB Zip
Zip Street City State
BCNF
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 7
BCNF (Boyce - Codd Normal Form)
Our relation should be in 3NF.
A relation R is considered to be in BCNF if for every one of its dependencies XY,
One of the following conditions holds true:
XY is a trivial functional dependency (i.e Y is subset of X)
X is super key for schema R
This form is also referred as 3.5 normal form.
Any table is said to be in BCNF if its candidate keys do not have any partial
dependency on the other attributes.
If (X, Y)Z and ZX then its violation of BCNF.

Learning of 3NF BCNF Normal Forms in DBMS.pptx

  • 1.
    Sanjivani Rural EducationSociety’s Sanjivani College of Engineering, Kopargaon-423 603 (An Autonomous Institute, Affiliated to Savitribai Phule Pune University, Pune) NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified Department of Computer Engineering (NBA Accredited) Prof. Monika Agrawal Assistant Professor E-mail : agrawalmonikacomp@sanjivani.org.in Contact No: 8770361037 Course:CO210 Database Management System Lecture-05 3NF BCNF
  • 2.
    Content s DEPARTMENT OF COMPUTERENGINEERING, Sanjivani COE, Kopargaon 2 Normalization Rule Purpose of Normalization 3 NF BCNF
  • 3.
    Normalization Rule DEPARTMENT OFCOMPUTER ENGINEERING, Sanjivani COE, Kopargaon 3 Normalization is a process of organizing the data in database to avoid data redundancy, insertion anomaly, update anomaly & deletion anomaly. Normalization is systematic approach of decomposing tables to eliminate data redundancy. Normalization rules are divided into the following normal forms: First Normal Form Second Normal Form Third Normal Form BCNF
  • 4.
    Purpose of Normalization DEPARTMENTOF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 4 Eliminating redundant (useless) data. Ensuring data dependencies make sense i.e data is logically stored.
  • 5.
    3NF DEPARTMENT OF COMPUTERENGINEERING, Sanjivani COE, Kopargaon 5 Table must be in 2NF. Every non prime attribute of table must be dependent on Primary Key. There should not be case that a non prime attribute is determined by another non prime attribute. This transitive functional dependency should be removed from table.
  • 6.
    3NF (Cont.) DEPARTMENT OFCOMPUTER ENGINEERING, Sanjivani COE, Kopargaon 6 Example:- Student Table In above table Student_Id is Primary key but Street, City and State depends on 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 a Primary Key. After 3NF:- Two tables Student_Id Student_Name DOB Street City State Zip Student_Id Student_Name DOB Zip Zip Street City State
  • 7.
    BCNF DEPARTMENT OF COMPUTERENGINEERING, Sanjivani COE, Kopargaon 7 BCNF (Boyce - Codd Normal Form) Our relation should be in 3NF. A relation R is considered to be in BCNF if for every one of its dependencies XY, One of the following conditions holds true: XY is a trivial functional dependency (i.e Y is subset of X) X is super key for schema R This form is also referred as 3.5 normal form. Any table is said to be in BCNF if its candidate keys do not have any partial dependency on the other attributes. If (X, Y)Z and ZX then its violation of BCNF.