SlideShare a Scribd company logo
The Normal Forms 3NF and BCNF BY Jasbir Jassu
Preview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Normalization ,[object Object],[object Object],[object Object],[object Object],[object Object]
Benefits of Normalization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Solution: Normal Forms ,[object Object],[object Object],[object Object],[object Object]
Third Normal Form (3NF) ,[object Object],[object Object],[object Object]
1) First normal form -1NF ,[object Object],[object Object],Jim Carter Paul Simon 30000 30001 13456 D102 Carl Sagan Mag James Larry Bird 20000 20001 20002 12345 D101 EMP_NM EMP_NO MG_NO   DPT_NO
Table in 1NF ,[object Object],Jim Carter 30000 13456 D102 Mag James 20001 12345 D101 Larry Bird 20002 12345 D101 Paul Simon 30001 13456 D102 Carl Sagan 20000 12345 D101 EMP_NM EMP_NO MG_NO   DPT_NO
2) Second Normal Form ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
No dependencies on non-key attributes ,[object Object],[object Object],[object Object],[object Object],Supplier Address Cost Supplier Description Inventory Cost Supplier Description Inventory
CONTINUED… ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Supplier Address Name Supplier Supplier Address Cost Supplier Description Inventory
So putting things together The above relation is now in 2NF since the relation has no non-key attributes.   Supplier Address Cost Supplier Description Inventory Cost Supplier Description Inventory Supplier Address Name Supplier
3) Remove columns that are not dependent upon the primary key.     So for every nontrivial functional dependency X --> A,  (1) X is a superkey, or (2) A is a prime (key) attribute.
Example of 3NF ,[object Object],[object Object],[object Object],# of Pages Author's Non-de Plume Author's Name Name Books # of Pages Author's Name Name Books Non-de Plume Name Author
Another example: Suppose we have relation S ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The table in 3NF 300 P1 Jones S2 200 P2 Yues S1 250 P3 Yues S2 100 P1 Yues   S1 QTY PART# SNAME SUPP#
Example with first three forms Suppose we have this Invoice Table ,[object Object],[object Object],[object Object]
Table now in 1NF
Second Normal Form:   Each column must depend on the *entire* primary key.
Third Normal Form:   Each column must depend on *directly* on the primary key.
Boyce-Codd Normal Form (BCNF) Boyce-Codd normal form (BCNF) A relation is in BCNF, if and only if, every determinant is a  candidate key. The difference between 3NF and BCNF  is that for a functional dependency A    B, 3NF allows this dependency in a relation  if B is a primary-key attribute and A is not a candidate key,  whereas BCNF insists that for this dependency to remain in a relation, A must be a candidate key.
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ClientInterview SG5 SG37 SG5 SG5 staffNo G102 10.30 1-Jul-02 CR56 G102 12.00 13-May-02 CR74 G101 10.30 13-May-02 CR76 G101 12.00 13-May-02 CR76 roomNo interviewTime interviewDate ClientNo
Example of BCNF(2) To transform the ClientInterview relation to BCNF, we must remove the violating functional dependency by creating two new relations called Interview and StaffRoom as shown below, Interview ( clientNo ,  interviewDate , interviewTime, staffNo) StaffRoom( staffNo ,  interviewDate,  roomNo) Interview StaffRoom BCNF Interview and StaffRoom relations SG5 SG37 SG5 SG5 staffNo 10.30 1-Jul-02 CR56 12.00 13-May-02 CR74 10.30 13-May-02 CR76 12.00 13-May-02 CR76 interviewTime interviewDate ClientNo SG5 SG37 SG5 staffNo G102 1-Jul-02 G102 13-May-02 G101 13-May-02 roomNo interviewDate
Another BCNF Example Example taken from Dr. Lee’s 2004 lecture notes
Sources: ,[object Object],[object Object],[object Object]

More Related Content

What's hot

Entity relationship diagram - Concept on normalization
Entity relationship diagram - Concept on normalizationEntity relationship diagram - Concept on normalization
Entity relationship diagram - Concept on normalization
Satya Pal
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Arun Sharma
 
Database normalization
Database normalizationDatabase normalization
Database normalizationJignesh Jain
 
Normalization
NormalizationNormalization
Normalization
meet darji
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationNickkisha Farrell
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Prateek Parimal
 
Dbms normalization
Dbms normalizationDbms normalization
Dbms normalization
Pratik Devmurari
 
Normalization by Ashwin and Tanmay
Normalization by Ashwin and TanmayNormalization by Ashwin and Tanmay
Normalization by Ashwin and TanmayAshwin Dinoriya
 
Normalization of Data Base
Normalization of Data BaseNormalization of Data Base
Normalization of Data Base
Ravinder Kamboj
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATION
bit allahabad
 
Normalization
NormalizationNormalization
Normalizationlingesan
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
Bishrul Haq
 
Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal formcollege
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
Roshni Singh
 
Normalization
NormalizationNormalization
Normalization
Altafsoomro
 
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
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization emailharmeet
 
Database normalization
Database normalizationDatabase normalization
Database normalization
Vaibhav Kathuria
 
Normalization
NormalizationNormalization
Normalization
Salman Memon
 

What's hot (20)

Entity relationship diagram - Concept on normalization
Entity relationship diagram - Concept on normalizationEntity relationship diagram - Concept on normalization
Entity relationship diagram - Concept on normalization
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Normalization
NormalizationNormalization
Normalization
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Dbms normalization
Dbms normalizationDbms normalization
Dbms normalization
 
Normalization by Ashwin and Tanmay
Normalization by Ashwin and TanmayNormalization by Ashwin and Tanmay
Normalization by Ashwin and Tanmay
 
Normalization of Data Base
Normalization of Data BaseNormalization of Data Base
Normalization of Data Base
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATION
 
Bcnf
BcnfBcnf
Bcnf
 
Normalization
NormalizationNormalization
Normalization
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal form
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
 
Normalization
NormalizationNormalization
Normalization
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Normalization
NormalizationNormalization
Normalization
 

Viewers also liked

Successful Prototyping
Successful PrototypingSuccessful Prototyping
Successful Prototyping
tawi123
 
Minimum Viable Product in brief!
Minimum Viable Product in brief!Minimum Viable Product in brief!
Minimum Viable Product in brief!
Mohammad Milani
 
Job Evaluation at Whole Foods
Job Evaluation at Whole FoodsJob Evaluation at Whole Foods
Job Evaluation at Whole Foods
سعد ابورياح
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
Jitendra Tomar
 

Viewers also liked (6)

Successful Prototyping
Successful PrototypingSuccessful Prototyping
Successful Prototyping
 
Minimum Viable Product in brief!
Minimum Viable Product in brief!Minimum Viable Product in brief!
Minimum Viable Product in brief!
 
Job Evaluation at Whole Foods
Job Evaluation at Whole FoodsJob Evaluation at Whole Foods
Job Evaluation at Whole Foods
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Job Evaluation
Job EvaluationJob Evaluation
Job Evaluation
 

Similar to Chuẩn hóa CSDL

Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwal
anerudhbalaji
 
Normalization_BCA_
Normalization_BCA_Normalization_BCA_
Normalization_BCA_
Bhavini Shah
 
Mca ii-dbms-u-iv-structured query language
Mca ii-dbms-u-iv-structured query languageMca ii-dbms-u-iv-structured query language
Mca ii-dbms-u-iv-structured query language
Rai University
 
Normalization
NormalizationNormalization
Normalization
Rajeev Srivastava
 
Normalization
NormalizationNormalization
Normalization
Burhan Ahmed
 
Database Normalization.ppt
Database Normalization.pptDatabase Normalization.ppt
Database Normalization.ppt
sabi ben
 
normalization.ppt
normalization.pptnormalization.ppt
normalization.ppt
FaizanBashirSidhu
 
normalization.ppt
normalization.pptnormalization.ppt
normalization.ppt
Infotech27
 
normalization.ppt
normalization.pptnormalization.ppt
normalization.ppt
niteshkumar334392
 
normalization-Normalization -Process of Divide Tables
normalization-Normalization -Process of Divide Tablesnormalization-Normalization -Process of Divide Tables
normalization-Normalization -Process of Divide Tables
dharawagh9999
 
normalization in Database Management Systems.ppt
normalization in Database Management Systems.pptnormalization in Database Management Systems.ppt
normalization in Database Management Systems.ppt
mohsinkhanscientist
 
Revision1510(1)
Revision1510(1)Revision1510(1)
Revision1510(1)
Xin Li
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
kshipra sony
 
Chapter10
Chapter10Chapter10
Chapter10
sasa_eldoby
 
Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.ppt
ssuser7e9b941
 
Normalisation
NormalisationNormalisation
Normalisation
Ravi Prakash
 
Normalization and three normal forms.pptx
Normalization and three normal forms.pptxNormalization and three normal forms.pptx
Normalization and three normal forms.pptx
Zoha681526
 
Normalization(15.09.2010)
Normalization(15.09.2010)Normalization(15.09.2010)
Normalization(15.09.2010)
Ravi Shekhar
 

Similar to Chuẩn hóa CSDL (20)

Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwal
 
Normalization_BCA_
Normalization_BCA_Normalization_BCA_
Normalization_BCA_
 
Mca ii-dbms-u-iv-structured query language
Mca ii-dbms-u-iv-structured query languageMca ii-dbms-u-iv-structured query language
Mca ii-dbms-u-iv-structured query language
 
Normalization
NormalizationNormalization
Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Database Normalization.ppt
Database Normalization.pptDatabase Normalization.ppt
Database Normalization.ppt
 
normalization.ppt
normalization.pptnormalization.ppt
normalization.ppt
 
normalization.ppt
normalization.pptnormalization.ppt
normalization.ppt
 
normalization.ppt
normalization.pptnormalization.ppt
normalization.ppt
 
normalization-Normalization -Process of Divide Tables
normalization-Normalization -Process of Divide Tablesnormalization-Normalization -Process of Divide Tables
normalization-Normalization -Process of Divide Tables
 
normalization in Database Management Systems.ppt
normalization in Database Management Systems.pptnormalization in Database Management Systems.ppt
normalization in Database Management Systems.ppt
 
Revision1510(1)
Revision1510(1)Revision1510(1)
Revision1510(1)
 
Presentation on Normalization.pptx
Presentation on Normalization.pptxPresentation on Normalization.pptx
Presentation on Normalization.pptx
 
Normalisation revision
Normalisation revisionNormalisation revision
Normalisation revision
 
Chapter10
Chapter10Chapter10
Chapter10
 
Normalization.ppt
Normalization.pptNormalization.ppt
Normalization.ppt
 
Normalisation
NormalisationNormalisation
Normalisation
 
Normalization and three normal forms.pptx
Normalization and three normal forms.pptxNormalization and three normal forms.pptx
Normalization and three normal forms.pptx
 
Normalization(15.09.2010)
Normalization(15.09.2010)Normalization(15.09.2010)
Normalization(15.09.2010)
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 

Chuẩn hóa CSDL

  • 1. The Normal Forms 3NF and BCNF BY Jasbir Jassu
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. So putting things together The above relation is now in 2NF since the relation has no non-key attributes. Supplier Address Cost Supplier Description Inventory Cost Supplier Description Inventory Supplier Address Name Supplier
  • 13. 3) Remove columns that are not dependent upon the primary key. So for every nontrivial functional dependency X --> A, (1) X is a superkey, or (2) A is a prime (key) attribute.
  • 14.
  • 15.
  • 16. The table in 3NF 300 P1 Jones S2 200 P2 Yues S1 250 P3 Yues S2 100 P1 Yues S1 QTY PART# SNAME SUPP#
  • 17.
  • 19. Second Normal Form: Each column must depend on the *entire* primary key.
  • 20. Third Normal Form: Each column must depend on *directly* on the primary key.
  • 21. Boyce-Codd Normal Form (BCNF) Boyce-Codd normal form (BCNF) A relation is in BCNF, if and only if, every determinant is a candidate key. The difference between 3NF and BCNF is that for a functional dependency A  B, 3NF allows this dependency in a relation if B is a primary-key attribute and A is not a candidate key, whereas BCNF insists that for this dependency to remain in a relation, A must be a candidate key.
  • 22.
  • 23. Example of BCNF(2) To transform the ClientInterview relation to BCNF, we must remove the violating functional dependency by creating two new relations called Interview and StaffRoom as shown below, Interview ( clientNo , interviewDate , interviewTime, staffNo) StaffRoom( staffNo , interviewDate, roomNo) Interview StaffRoom BCNF Interview and StaffRoom relations SG5 SG37 SG5 SG5 staffNo 10.30 1-Jul-02 CR56 12.00 13-May-02 CR74 10.30 13-May-02 CR76 12.00 13-May-02 CR76 interviewTime interviewDate ClientNo SG5 SG37 SG5 staffNo G102 1-Jul-02 G102 13-May-02 G101 13-May-02 roomNo interviewDate
  • 24. Another BCNF Example Example taken from Dr. Lee’s 2004 lecture notes
  • 25.