Database Management
System
Bhoomika Patel , Assistant Professor
Computer Science & Engineering
Relational Databse Design
CHAPTER-5
Content
s
● Functional Dependency – definition, trivial and non-trivial FD
● Armstrong's Axioms/Inference Rules
● Closure of FD
● Closure of Attributes
● Candidate Key
● Finding a Candidate Key
● Decomposition (Lossy & Lossless)
● Database Anomalies
● normalization – 1Nf, 2NF, 3NF, BCNF, 4NF, 5NF
● Functional Dependency:
● Brief overview of databases and the importance of data integrity.
● Introduction to Functional Dependencies (FD) as a concept ensuring data consistency.
● Functional Dependency (FD) is a constraint between two sets of attributes in a relation from a
database.
● Notation: X→YX rightarrow YX→Y
● Meaning: Attribute Y is functionally dependent on attribute X if each value of X is associated with
precisely one value of Y.
● Example:
● Table with attributes: StudentID, StudentName, CourseID, CourseName
● Example FD: StudentID→StudentNameStudentID rightarrow
StudentNameStudentID→StudentName, CourseID→CourseNameCourseID rightarrow
CourseNameCourseID→CourseName
● Explanation of the relationship between the attributes.
● Trivial Functional Dependency:
● Definition: A functional dependency X→YX rightarrow YX→Y is trivial if YYY is a subset of XXX.
● Example: If X={A,B}X = {A, B}X={A,B}, then A→AA rightarrow AA→A and {A,B}→A{A, B}
rightarrow A{A,B}→A are trivial FDs.
● Explanation: These dependencies hold true by default.
● Non-Trivial Functional Dependency:
● Definition: A functional dependency X→YX rightarrow YX→Y is non-trivial if YYY is not a subset of
XXX.
● Example: If X={A}X = {A}X={A} and Y={B}Y = {B}Y={B}, then A→BA rightarrow BA→B is non-
trivial.
● Explanation: These dependencies provide meaningful constraints in database design.
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
● Candidatekey:
● A candidate key is a minimal set of attributes that can uniquely identify a tuple in a relation.
● Every relation can have one or more candidate keys.
● Finding candidate key:
Given a relation and a set of functional dependencies:
● Relation R(A, B, C, D)
● FDs: {A → B, C → D}
Step-by-step process to identify candidate keys.
● Decomposition:
● Decomposition is the process of breaking down a relation into two or more
sub-relations.
● Purpose: To eliminate redundancy, prevent anomalies, and ensure data
integrity.
● Types:
● Lossy Decomposition
● Lossless Decomposition
● Lossy Decomposition:
● Definition: Decomposition where the original relation cannot be perfectly
reconstructed from the decomposed sub-relations.
● Example: Illustrative example showing data loss after decomposition.
● Consequences: Data anomalies, potential loss of information.
● Given relation R(A, B, C).
● Decomposed into R1(A, B) and R2(B, C).
● Loss of information due to redundancy in B.
● Illustration of how original relation cannot be accurately reconstructed.
Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules
● Lossless Decomposition:
● Definition: Decomposition where the original relation can be perfectly
reconstructed from the decomposed sub-relations.
● Conditions: Dependency preservation and ensuring common attributes form a
super key.
● Importance: Ensures data integrity and prevents anomalies.
● Given relation R(A, B, C).
● Decomposed into R1(A, B) and R2(A, C).
● Reconstruction: Natural join of R1 and R2 restores the original relation.
● Illustration of how the original relation is accurately reconstructed.
● Database Anomalies:
● Definition: Inconsistencies or errors in a database due to improper database
design.
● Causes: Typically caused by redundancy and lack of normalization.
First Normal Form (1NF)
○ Definition: A relation is in 1NF if it contains only atomic (indivisible) values.
○ Rules: No repeating groups, no multi-valued attributes.
○ Example: Converting a table with repeating groups to 1NF.
Example: First Normal Form (1NF)
○ Initial table with repeating groups.
○ Conversion to 1NF by eliminating repeating groups and ensuring atomic values.
Second Normal Form (2NF)
○ Definition: A relation is in 2NF if it is in 1NF and all non-key attributes are fully dependent on
the primary key.
○ Rule: Eliminate partial dependencies.
○ Example: Converting a table from 1NF to 2NF.
example: Second Normal Form (2NF)
○ Initial table in 1NF with partial dependencies.
○ Conversion to 2NF by removing partial dependencies and creating separate tables.
Third Normal Form (3NF):
○ Definition: A relation is in 3NF if it is in 2NF and all the attributes are functionally
dependent only on the primary key.
○ Rule: Eliminate transitive dependencies.
○ Example: Converting a table from 2NF to 3NF.
Example: Third Normal Form (3NF)
○ Initial table in 2NF with transitive dependencies.
○ Conversion to 3NF by removing transitive dependencies and creating separate
tables.
Boyce-Codd Normal Form (BCNF)
○ Definition: A relation is in BCNF if it is in 3NF and every determinant is a candidate key.
○ Rule: Handle situations where 3NF is insufficient.
○ Example: Converting a table from 3NF to BCNF.
Example: Boyce-Codd Normal Form (BCNF)
○ Initial table in 3NF with anomalies.
○ Conversion to BCNF by ensuring every determinant is a candidate key.
Fourth Normal Form (4NF)
○ Definition: A relation is in 4NF if it is in BCNF and has no multi-valued dependencies.
○ Rule: Eliminate multi-valued dependencies.
○ Example: Converting a table from BCNF to 4NF.
Example: Fourth Normal Form (4NF)
○ Initial table in BCNF with multi-valued dependencies.
○ Conversion to 4NF by removing multi-valued dependencies and creating separate tables.
Fifth Normal Form (5NF)
○ Definition: A relation is in 5NF if it is in 4NF and has no join dependencies.
○ Rule: Eliminate join dependencies.
○ Example: Converting a table from 4NF to 5NF.
Example: Fifth Normal Form (5NF)
○ Initial table in 4NF with join dependencies.
○ Conversion to 5NF by removing join dependencies and ensuring that the table can be
decomposed into smaller tables without loss of information.
www.paruluniversity.ac.
in

More Related Content

PDF
Database management system session 5
PPTX
DBMS_Module 3_Functional Dependencies and Normalization.pptx
PDF
Normalization in DBMS
PPTX
Normalization
PPT
DBMS-Unit-3.0 Functional dependencies.ppt
PPTX
CC03_FDAnnnnnnnnnnnnnnnnnnnnnndNoon.pptx
PDF
Chapter – 4 Normalization and Relational Algebra.pdf
Database management system session 5
DBMS_Module 3_Functional Dependencies and Normalization.pptx
Normalization in DBMS
Normalization
DBMS-Unit-3.0 Functional dependencies.ppt
CC03_FDAnnnnnnnnnnnnnnnnnnnnnndNoon.pptx
Chapter – 4 Normalization and Relational Algebra.pdf

Similar to Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules (20)

PPTX
Normalization in data base management system.pptx
PPTX
normalization ppt.pptx
PDF
chapter 4-Functional Dependency and Normilization.pdf
PPT
DBMS e evevevevevevevbebrbbrbrbrbrbrbrb 4.ppt
PPTX
Database normalization
PPTX
NORMALIZATION.pptx
PPT
Lecture No. 21-22.ppt
PPTX
DBMS_UNIT_IV.pptxbdndjdkdjdndjkdkdkdkdkdkdk
PPTX
Normalization
PPTX
Normalization-1NF,2NF,Functional dependencies.pptx
PDF
Penormalan/Normalization
PPT
Chapter six - Normalization.ppt fundamental of db
PPTX
Distributed DBMS - Unit 2 - Overview of RDBMS
PPT
UNIT-IV.ppt
PDF
DBMS unit-3.pdf
PPTX
chapter_8.pptx
PPT
Normal forms.ppt
PPT
Normalizations
PPTX
Relational Algebra in Database Systems.pptx
PPT
MODULE 3 -Normalizavcgvhvhvyvhvjbhvtion_1.ppt
Normalization in data base management system.pptx
normalization ppt.pptx
chapter 4-Functional Dependency and Normilization.pdf
DBMS e evevevevevevevbebrbbrbrbrbrbrbrb 4.ppt
Database normalization
NORMALIZATION.pptx
Lecture No. 21-22.ppt
DBMS_UNIT_IV.pptxbdndjdkdjdndjkdkdkdkdkdkdk
Normalization
Normalization-1NF,2NF,Functional dependencies.pptx
Penormalan/Normalization
Chapter six - Normalization.ppt fundamental of db
Distributed DBMS - Unit 2 - Overview of RDBMS
UNIT-IV.ppt
DBMS unit-3.pdf
chapter_8.pptx
Normal forms.ppt
Normalizations
Relational Algebra in Database Systems.pptx
MODULE 3 -Normalizavcgvhvhvyvhvjbhvtion_1.ppt
Ad

More from VishwanathJustRockin (13)

PPT
38-dip.ppt................................
PPTX
Session02.pptx...........................
PPT
comp. Architecture.ppt . ......................
PPT
713_Intro-S24.ppt .....................................
PPT
17647_chapter4-1.ppt .........................
PPTX
Radar ...............................................
PPTX
DBMS. ................................................
PPTX
database management.............................................................
PPT
introduction radar PPt.......................................
PPTX
PPT-unit-1.pptx.......................................
PPT
DeadlockMar21.ppt.....................................
PPTX
DBMS UNIT 9.pptx..................................
PPTX
Introduction to DBMS...........................................
38-dip.ppt................................
Session02.pptx...........................
comp. Architecture.ppt . ......................
713_Intro-S24.ppt .....................................
17647_chapter4-1.ppt .........................
Radar ...............................................
DBMS. ................................................
database management.............................................................
introduction radar PPt.......................................
PPT-unit-1.pptx.......................................
DeadlockMar21.ppt.....................................
DBMS UNIT 9.pptx..................................
Introduction to DBMS...........................................
Ad

Recently uploaded (20)

PPTX
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
PDF
ITEC 1010 - Networks and Cloud Computing
PDF
1.-fincantieri-investor-presentation2.pdf
PDF
Water Industry Process Automation & Control Monthly - September 2025
PPTX
non conventional energy resorses material unit-1
PDF
Traditional Programming vs Machine learning and Models in Machine Learning
PDF
August 2025 Top read articles in International Journal of Database Managemen...
PDF
BBC NW_Tech Facilities_30 Odd Yrs Ago [J].pdf
PDF
Human CELLS and structure in Anatomy and human physiology
PDF
AI agent, robotics based Smart Construction 2025
PPTX
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
PPTX
L1111-Important Microbial Mechanisms.pptx
PPTX
Unit I - Mechatronics.pptx presentation
PPTX
22ME926Introduction to Business Intelligence and Analytics, Advanced Integrat...
PPT
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
PDF
B461227.pdf American Journal of Multidisciplinary Research and Review
PPTX
240409 Data Center Training Programs by Uptime Institute (Drafting).pptx
PDF
Application of smart robotics in the supply chain
PPTX
CC PPTS unit-I PPT Notes of Cloud Computing
PPTX
highway-150803160405-lva1-app6891 (1).pptx
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
ITEC 1010 - Networks and Cloud Computing
1.-fincantieri-investor-presentation2.pdf
Water Industry Process Automation & Control Monthly - September 2025
non conventional energy resorses material unit-1
Traditional Programming vs Machine learning and Models in Machine Learning
August 2025 Top read articles in International Journal of Database Managemen...
BBC NW_Tech Facilities_30 Odd Yrs Ago [J].pdf
Human CELLS and structure in Anatomy and human physiology
AI agent, robotics based Smart Construction 2025
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
L1111-Important Microbial Mechanisms.pptx
Unit I - Mechatronics.pptx presentation
22ME926Introduction to Business Intelligence and Analytics, Advanced Integrat...
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
B461227.pdf American Journal of Multidisciplinary Research and Review
240409 Data Center Training Programs by Uptime Institute (Drafting).pptx
Application of smart robotics in the supply chain
CC PPTS unit-I PPT Notes of Cloud Computing
highway-150803160405-lva1-app6891 (1).pptx

Relational Database Design Functional Dependency – definition, trivial and non-trivial FD, Armstrong's Axioms/Inference Rules

  • 1. Database Management System Bhoomika Patel , Assistant Professor Computer Science & Engineering
  • 3. Content s ● Functional Dependency – definition, trivial and non-trivial FD ● Armstrong's Axioms/Inference Rules ● Closure of FD ● Closure of Attributes ● Candidate Key ● Finding a Candidate Key ● Decomposition (Lossy & Lossless) ● Database Anomalies ● normalization – 1Nf, 2NF, 3NF, BCNF, 4NF, 5NF
  • 4. ● Functional Dependency: ● Brief overview of databases and the importance of data integrity. ● Introduction to Functional Dependencies (FD) as a concept ensuring data consistency. ● Functional Dependency (FD) is a constraint between two sets of attributes in a relation from a database. ● Notation: X→YX rightarrow YX→Y ● Meaning: Attribute Y is functionally dependent on attribute X if each value of X is associated with precisely one value of Y. ● Example: ● Table with attributes: StudentID, StudentName, CourseID, CourseName ● Example FD: StudentID→StudentNameStudentID rightarrow StudentNameStudentID→StudentName, CourseID→CourseNameCourseID rightarrow CourseNameCourseID→CourseName ● Explanation of the relationship between the attributes.
  • 5. ● Trivial Functional Dependency: ● Definition: A functional dependency X→YX rightarrow YX→Y is trivial if YYY is a subset of XXX. ● Example: If X={A,B}X = {A, B}X={A,B}, then A→AA rightarrow AA→A and {A,B}→A{A, B} rightarrow A{A,B}→A are trivial FDs. ● Explanation: These dependencies hold true by default.
  • 6. ● Non-Trivial Functional Dependency: ● Definition: A functional dependency X→YX rightarrow YX→Y is non-trivial if YYY is not a subset of XXX. ● Example: If X={A}X = {A}X={A} and Y={B}Y = {B}Y={B}, then A→BA rightarrow BA→B is non- trivial. ● Explanation: These dependencies provide meaningful constraints in database design.
  • 24. ● Candidatekey: ● A candidate key is a minimal set of attributes that can uniquely identify a tuple in a relation. ● Every relation can have one or more candidate keys. ● Finding candidate key: Given a relation and a set of functional dependencies: ● Relation R(A, B, C, D) ● FDs: {A → B, C → D} Step-by-step process to identify candidate keys.
  • 25. ● Decomposition: ● Decomposition is the process of breaking down a relation into two or more sub-relations. ● Purpose: To eliminate redundancy, prevent anomalies, and ensure data integrity. ● Types: ● Lossy Decomposition ● Lossless Decomposition
  • 26. ● Lossy Decomposition: ● Definition: Decomposition where the original relation cannot be perfectly reconstructed from the decomposed sub-relations. ● Example: Illustrative example showing data loss after decomposition. ● Consequences: Data anomalies, potential loss of information. ● Given relation R(A, B, C). ● Decomposed into R1(A, B) and R2(B, C). ● Loss of information due to redundancy in B. ● Illustration of how original relation cannot be accurately reconstructed.
  • 28. ● Lossless Decomposition: ● Definition: Decomposition where the original relation can be perfectly reconstructed from the decomposed sub-relations. ● Conditions: Dependency preservation and ensuring common attributes form a super key. ● Importance: Ensures data integrity and prevents anomalies. ● Given relation R(A, B, C). ● Decomposed into R1(A, B) and R2(A, C). ● Reconstruction: Natural join of R1 and R2 restores the original relation. ● Illustration of how the original relation is accurately reconstructed.
  • 29. ● Database Anomalies: ● Definition: Inconsistencies or errors in a database due to improper database design. ● Causes: Typically caused by redundancy and lack of normalization.
  • 30. First Normal Form (1NF) ○ Definition: A relation is in 1NF if it contains only atomic (indivisible) values. ○ Rules: No repeating groups, no multi-valued attributes. ○ Example: Converting a table with repeating groups to 1NF. Example: First Normal Form (1NF) ○ Initial table with repeating groups. ○ Conversion to 1NF by eliminating repeating groups and ensuring atomic values.
  • 31. Second Normal Form (2NF) ○ Definition: A relation is in 2NF if it is in 1NF and all non-key attributes are fully dependent on the primary key. ○ Rule: Eliminate partial dependencies. ○ Example: Converting a table from 1NF to 2NF. example: Second Normal Form (2NF) ○ Initial table in 1NF with partial dependencies. ○ Conversion to 2NF by removing partial dependencies and creating separate tables.
  • 32. Third Normal Form (3NF): ○ Definition: A relation is in 3NF if it is in 2NF and all the attributes are functionally dependent only on the primary key. ○ Rule: Eliminate transitive dependencies. ○ Example: Converting a table from 2NF to 3NF. Example: Third Normal Form (3NF) ○ Initial table in 2NF with transitive dependencies. ○ Conversion to 3NF by removing transitive dependencies and creating separate tables.
  • 33. Boyce-Codd Normal Form (BCNF) ○ Definition: A relation is in BCNF if it is in 3NF and every determinant is a candidate key. ○ Rule: Handle situations where 3NF is insufficient. ○ Example: Converting a table from 3NF to BCNF. Example: Boyce-Codd Normal Form (BCNF) ○ Initial table in 3NF with anomalies. ○ Conversion to BCNF by ensuring every determinant is a candidate key.
  • 34. Fourth Normal Form (4NF) ○ Definition: A relation is in 4NF if it is in BCNF and has no multi-valued dependencies. ○ Rule: Eliminate multi-valued dependencies. ○ Example: Converting a table from BCNF to 4NF. Example: Fourth Normal Form (4NF) ○ Initial table in BCNF with multi-valued dependencies. ○ Conversion to 4NF by removing multi-valued dependencies and creating separate tables.
  • 35. Fifth Normal Form (5NF) ○ Definition: A relation is in 5NF if it is in 4NF and has no join dependencies. ○ Rule: Eliminate join dependencies. ○ Example: Converting a table from 4NF to 5NF. Example: Fifth Normal Form (5NF) ○ Initial table in 4NF with join dependencies. ○ Conversion to 5NF by removing join dependencies and ensuring that the table can be decomposed into smaller tables without loss of information.