SlideShare una empresa de Scribd logo
1 de 30
FUNCTIONAL
DEPENDENCIES
AND
NORMALIZATION
PRESENTATION BY:
SAUMYA TRIVEDI (1697)
VANDANA VASHISTH (1831)
DIMPY CHUGH (1833)
DRISHTI BHALLA (1838)
INFORMAL DESIGN
GUIDELINES FOR
RELATIONAL DATABASES
GUIDELINE 1: Design a relation schema so that it is easy to
interpret its meaning relation by relation.
• Do not combine attributes from multiple entity types and
relationships types into a single relation.
• Only foreign keys should be used to refer to other entities.
INFORMAL DESIGN GUIDELINES FOR
RELATIONAL DATABASES
Semantics of the Relation Attributes
One goal of schema design is to minimize the storage space that the
base relations (files) occupy, but in case of presence of redundant
information this can not be fulfilled.
Another serious problem with redundancy is the problem of update
anomalies. These can be classified into:
•Insertion Anomalies
•Deletion Anomalies
•Modification Anomalies
GUIDELINE 2: Design the base relation schemas so that no insertion, deletion
, or modification anomalies occur in the relations. If any anomalies are present,
note them clearly so that the programs that update the database will operate
correctly
 Redundant Information in Tuples
ID Name Address Subject
ID
Subject
Name
Teacher
401 Adam London 01 Math M. Smith
402 Alex Austria 03 English L. Brown
403 Alice Germany 02 Physics P. James
404 George London 02 Physics P. James
405 Jennifer New York 05 History I. John
ID Name Address Subject ID
401 Adam London 01
402 Alex Austria 03
403 Alice Germany 02
404 George London 02
405 Jennifer New York 05
Subject ID Subject Name Teacher
01 Math M. Smith
02 Physics P. James
03 English L. Brown
05 History I. John
GUIDELINE 3: Avoid placing attributes in a relation whose values
may be null.
Reasons for nulls:
• Attribute not applicable or invalid
• Attribute value unknown (may exist)
• Value known to exist, but unavailable
 Null Values In Tuples
A spurious tuple is, basically, a record in a database that gets created
when two tables are joined badly. Spurious tuples are created when
two tables are joined on attributes that are neither primary keys nor
foreign keys.
GUIDELINE 4: Design relation schemas so that they satisfy the
lossless join condition and no spurious tuples are generated.
ID Name Address
401 Adam London
402 Alex Austria
403 Alice Germany
404 George London
 Spurious Tuples
ID Address
401 London
402 Austria
403 Germany
404 London
Address Name
London Adam
Austria Alex
Germany Alice
London George
Natural Join
ID Address Name
401 London Adam
401 London Gorge
402 Austria Alex
403 Germany Alice
404 London Adam
404 London George
FUNCTIONAL
DEPENDENCIES
Functional Dependency(FD) is a set of constraints between attributes
of a relation .
Given a relation R, a set of attributes X in R is said to functionally
determine another set of attributes Y, also in R, (written X → Y) if,
and only if, each X value is associated with precisely one Y value; R is
then said to satisfy the functional dependency X → Y.
For any two tuples s1 and s2 in any relation instance r(R): If
s1[X]=s2[X], then s1[Y]=s2[Y].
FUNCTIONAL DEPENDENCIES
EXAMPLE OF FUNCTIONAL DEPENDENCIES
Name Class Subject Age
Pooja 5th English 10
Priya 4th Hindi 9
Pooja 5th Maths 10
Pooja 6th Science 10
Sneha 7th Computer 11
2. Class->Name, Class+Subject->Name+Subject
3. Class->Name, Name-> Age, Class->Age
4. Class->Name, Class->Age, Class->Name+Age
5. Class->Name+Age, Class-> Name, Class->Age
6. Class->Name, Name+Subject->Age, Class+subject->Age
Rules of Inference for functional dependencies, called Armstrong
axioms, can be used to find all the FDs logically implied by a set of FDs.
Let A,B,C and D be subsets of attributes of a relation R then following
are the different inference rules :
1.Reflexivity
If B is a subset of A then, A->B. This also implies A->A always hold.
2.Augmentation:
If we have AB then ACBC.
3.Transitivity:
If AB and BC, then AC.
4.Additivity or Union:
If AB and AC, then ABC.
5.Projectivity or Decomposition:
If ABC then AB and AC.
6.Pseudo transitivity:
If AB and CBD, then ACD.
INFERENCE RULES OF FDs
• Closure of a set F of FDs is the set of all FDs logically implied by
F.
Example : Suppose we are given a relation scheme R=(A,B,C,G,H,I)
and the set of FDs as :
F={AB,CGH,CGI,BH }
Therefore, F + ={AH (By Transitivity), CGHI(By Additivity or Union)}
INFERENCE RULES OF FDs
EQUIVALENCE OF SETS OF FDs
Two sets of FDs, F1 and F2 are equivalent if and only if-
- every FD in F1 can be inferred from F2
- every FD in F2 can be inferred from F1
Example : Consider F1 = {A->B, B->H, A->H} & F2 = {A->B, B->H}
F2 :A->A; A->B; A->H;
F2 :B->B; B->H;
F1 :A->A; A->B; A->H;
F1 :BC; B->B; B->H;
Since all FDs in F1 can be obtained from F2 and vice versa, we
conclude that F1 and F2 are equivalent.
MINIMAL SETS OF FDs
A set of FDs is minimal if it satisfies the following conditions:
1).Every dependency in F has a single attribute for its RHS.
2).We cannot remove any dependency from F and have a set of
dependencies that is equivalent to F.
F={AB, BH, AH }
F new={AB, BH }
3).We cannot replace any dependency X -> A in F with a
dependency Y -> A, where Y proper-subset-of X ( Y subset-of X)
and still have a set of dependencies that is equivalent to F.
FULL AND PARTIAL FUNCTIONAL DEPENDENCY
• Grade is fully functionally dependent on the primary key (ID,
Course-ID) because both parts of the primary keys are needed to
determine Grade.
• On the other hand both Name and Phone attributes
are partially dependent on the primary key, because only a part of
the primary key namely ID is needed to determine them and
similarly Credit-Hours and Course-Name can be determined
using Course-ID .
ID Name Phone Course
ID
Course Name Credit
-Hours
Grade
NORMALIZATION
Normalisation works through a series of stages called Normal
Forms . Various Normal Forms are :
 First Normal Form(1NF)
 Second Normal Form(2NF)
 Third Normal Form(3NF)
 Boyce- Codd Normal Form(BCNF)
Normalization is a step-by-step refinement process during which
unsatisfactory or bad relations are decomposed by breaking up their
attributes into smaller relations that possess desirable properties.
NORMALIZATION
NORMAL FORM
 Reduces Data Redundancy.
 Reduces the chances of Data Anomalies occurring.
 Provides a robust architecture for retrieving and maintaining
data.
 Produces high quality relational schema designs.
NORMALIZATION BENEFITS
A Relation Schema R is said to be in 1NF when :-
 The relation has a primary key.
 The relation does not have composite attributes, multivalued
attributes and nested relations .
 The non-key attributes depend on the primary key.
FIRST NORMAL FORM (1NF)
EXAMPLE OF 1st NORMAL FORM
Name Age Subject
Alex 17 Math, Biology
Adam 15 Physics
Alice 16 Chemistry, Math
Name Age Subject
Alex 17 Math
Alex 17 Biology
Adam 15 Physics
Alice 16 Chemistry
Alice 16 Math
A Relation Schema R is said to be in 2NF when: -
 The relations meet the criteria for first normal form.
 Every non-prime attribute A in R is fully functionally dependent
on the primary key .
SECOND NORMAL FORM (2NF)
EXAMPLE OF 2nd NORMAL FORM
Name Age Subject
Alex 17 Math
Alex 17 Biology
Adam 15 Physics
Alice 16 Chemistry
Alice 16 Math
Name Subject
Alex Math
Alex Biology
Adam Physics
Alice Chemistry
Alice Math
Name Age
Alex 17
Adam 15
Alice 16
A Relation Schema R is said to be in 3NF when :-
 The relations meet the criteria for second normal form.
 No non-prime attribute A in R is transitively dependent on the
primary key.
According to the general definition of 3NF for multiple candidate
keys , A relation schema R is in 3NF if whenever a FD X -> A holds
in R, then either:
• X is a super key of R, or
• A is a prime attribute of R
THIRD NORMAL FORM (3NF)
EXAMPLE OF 3rd NORMAL FORM
ID Name DOB Street City State Zip
Zip Street City StateID Name DOB Zip
A Relation Schema R is said to be in BCNF
 If whenever a FD X -> A holds in R, then X is a super key of R.
BCNF is simply a stronger definition of 3NF. Every BCNF relation is
in 3NF.
BOYCE –CODD NORMAL FORM
ID Name Address DOB City
ID Name DOB City City Address
EXAMPLE OF BOYCE CODD NORMAL FORM
•http://www.studytonight.com/dbms/database-normalization.php
•http://www.vertabelo.com/blog/technical-articles/boyce-codd-
normal-form-bcnf
•http://db.grussell.org/section009.html
•http://holowczak.com/database-normalization/
•http://www.w3schools.in/dbms/database-normalization/
•http://www.seas.gwu.edu/~bhagiweb/cs2441/lectures/schema-
design.pdf
•Fundamentals of Database Systems- Ramez Elmasri, Shamkant
B. Navathe
BIBLIOGRAPHY
THANK YOU !!!

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalization
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Functional dependency and normalization
Functional dependency and normalizationFunctional dependency and normalization
Functional dependency and normalization
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
Bcnf
BcnfBcnf
Bcnf
 
Database - Normalization
Database - NormalizationDatabase - Normalization
Database - Normalization
 
Relational Algebra & Calculus
Relational Algebra & CalculusRelational Algebra & Calculus
Relational Algebra & Calculus
 
Dependency preservation
Dependency preservationDependency preservation
Dependency preservation
 
Normalization
NormalizationNormalization
Normalization
 
Normalisation revision
Normalisation revisionNormalisation revision
Normalisation revision
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
 
Normalization of Data Base
Normalization of Data BaseNormalization of Data Base
Normalization of Data Base
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Relational model
Relational modelRelational model
Relational model
 
Relational Algebra-Database Systems
Relational Algebra-Database SystemsRelational Algebra-Database Systems
Relational Algebra-Database Systems
 

Destacado

functional dependencies with example
functional dependencies with examplefunctional dependencies with example
functional dependencies with exampleSiddhi Viradiya
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
 
Theory of dependencies in relational database
Theory of dependencies in relational databaseTheory of dependencies in relational database
Theory of dependencies in relational databaseJyoti Ranjan Pattnaik
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Jargalsaikhan Alyeksandr
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems incMuthu Natarajan
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of NormalizationShwe Yee
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesJafar Nesargi
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converterUshaswini Chowdary
 
BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesstudent
 

Destacado (13)

functional dependencies with example
functional dependencies with examplefunctional dependencies with example
functional dependencies with example
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Theory of dependencies in relational database
Theory of dependencies in relational databaseTheory of dependencies in relational database
Theory of dependencies in relational database
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
 
Normalization
NormalizationNormalization
Normalization
 
Importance of Normalization
Importance of NormalizationImportance of Normalization
Importance of Normalization
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
 
Normalization
NormalizationNormalization
Normalization
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converter
 
BCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codesBCD,GRAY and EXCESS 3 codes
BCD,GRAY and EXCESS 3 codes
 

Similar a Fd & Normalization - Database Management System

Similar a Fd & Normalization - Database Management System (20)

Normalization
NormalizationNormalization
Normalization
 
Normalization1
Normalization1Normalization1
Normalization1
 
Introduction to database-Normalisation
Introduction to database-NormalisationIntroduction to database-Normalisation
Introduction to database-Normalisation
 
UNIT-IV.ppt
UNIT-IV.pptUNIT-IV.ppt
UNIT-IV.ppt
 
Normalization
NormalizationNormalization
Normalization
 
L8 design1
L8 design1L8 design1
L8 design1
 
Function Dependencies and Normalization
 Function Dependencies and Normalization Function Dependencies and Normalization
Function Dependencies and Normalization
 
eaxmple of Normalisation
eaxmple of Normalisationeaxmple of Normalisation
eaxmple of Normalisation
 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5
 
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NFALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
ALGORITHM FOR RELATIONAL DATABASE NORMALIZATION UP TO 3NF
 
Decomposition using Functional Dependency
Decomposition using Functional DependencyDecomposition using Functional Dependency
Decomposition using Functional Dependency
 
DBMS-Normalization.ppt
DBMS-Normalization.pptDBMS-Normalization.ppt
DBMS-Normalization.ppt
 
ch7-clean.ppt
ch7-clean.pptch7-clean.ppt
ch7-clean.ppt
 
24042020_normalization 1.pdf
24042020_normalization 1.pdf24042020_normalization 1.pdf
24042020_normalization 1.pdf
 
Chapter10
Chapter10Chapter10
Chapter10
 
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdffunctionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
functionaldependenciesandnormalization-150628061940-lva1-app6891.pdf
 
Normalization
NormalizationNormalization
Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Relational database
Relational  databaseRelational  database
Relational database
 
chapter_8.pptx
chapter_8.pptxchapter_8.pptx
chapter_8.pptx
 

Más de Drishti Bhalla

Propositions - Discrete Structures
Propositions - Discrete Structures Propositions - Discrete Structures
Propositions - Discrete Structures Drishti Bhalla
 
Physical Layer Numericals - Data Communication & Networking
Physical Layer  Numericals - Data Communication & NetworkingPhysical Layer  Numericals - Data Communication & Networking
Physical Layer Numericals - Data Communication & NetworkingDrishti Bhalla
 
Determinants - Mathematics
Determinants - MathematicsDeterminants - Mathematics
Determinants - MathematicsDrishti Bhalla
 
Matrices - Mathematics
Matrices - MathematicsMatrices - Mathematics
Matrices - MathematicsDrishti Bhalla
 
Mid point line Algorithm - Computer Graphics
Mid point line Algorithm - Computer GraphicsMid point line Algorithm - Computer Graphics
Mid point line Algorithm - Computer GraphicsDrishti Bhalla
 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsDrishti Bhalla
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - JavaDrishti Bhalla
 
Airline Reservation System - Software Engineering
Airline Reservation System - Software EngineeringAirline Reservation System - Software Engineering
Airline Reservation System - Software EngineeringDrishti Bhalla
 
Performance Management and Feedback - SHRM
Performance Management and Feedback - SHRMPerformance Management and Feedback - SHRM
Performance Management and Feedback - SHRMDrishti Bhalla
 
Computer System Architecture - BUN instruction
Computer System Architecture - BUN instructionComputer System Architecture - BUN instruction
Computer System Architecture - BUN instructionDrishti Bhalla
 
King of acids -Sulphuric Acid H2SO4
King of acids -Sulphuric Acid H2SO4King of acids -Sulphuric Acid H2SO4
King of acids -Sulphuric Acid H2SO4Drishti Bhalla
 
Information Technology - System Threats
Information Technology - System ThreatsInformation Technology - System Threats
Information Technology - System ThreatsDrishti Bhalla
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software EngineeringDrishti Bhalla
 
Binary Search - Design & Analysis of Algorithms
Binary Search - Design & Analysis of AlgorithmsBinary Search - Design & Analysis of Algorithms
Binary Search - Design & Analysis of AlgorithmsDrishti Bhalla
 
CNF & Leftmost Derivation - Theory of Computation
CNF & Leftmost Derivation - Theory of ComputationCNF & Leftmost Derivation - Theory of Computation
CNF & Leftmost Derivation - Theory of ComputationDrishti Bhalla
 

Más de Drishti Bhalla (16)

Propositions - Discrete Structures
Propositions - Discrete Structures Propositions - Discrete Structures
Propositions - Discrete Structures
 
Physical Layer Numericals - Data Communication & Networking
Physical Layer  Numericals - Data Communication & NetworkingPhysical Layer  Numericals - Data Communication & Networking
Physical Layer Numericals - Data Communication & Networking
 
Determinants - Mathematics
Determinants - MathematicsDeterminants - Mathematics
Determinants - Mathematics
 
Matrices - Mathematics
Matrices - MathematicsMatrices - Mathematics
Matrices - Mathematics
 
Holy Rivers - Hindi
Holy Rivers - HindiHoly Rivers - Hindi
Holy Rivers - Hindi
 
Mid point line Algorithm - Computer Graphics
Mid point line Algorithm - Computer GraphicsMid point line Algorithm - Computer Graphics
Mid point line Algorithm - Computer Graphics
 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating Systems
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - Java
 
Airline Reservation System - Software Engineering
Airline Reservation System - Software EngineeringAirline Reservation System - Software Engineering
Airline Reservation System - Software Engineering
 
Performance Management and Feedback - SHRM
Performance Management and Feedback - SHRMPerformance Management and Feedback - SHRM
Performance Management and Feedback - SHRM
 
Computer System Architecture - BUN instruction
Computer System Architecture - BUN instructionComputer System Architecture - BUN instruction
Computer System Architecture - BUN instruction
 
King of acids -Sulphuric Acid H2SO4
King of acids -Sulphuric Acid H2SO4King of acids -Sulphuric Acid H2SO4
King of acids -Sulphuric Acid H2SO4
 
Information Technology - System Threats
Information Technology - System ThreatsInformation Technology - System Threats
Information Technology - System Threats
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software Engineering
 
Binary Search - Design & Analysis of Algorithms
Binary Search - Design & Analysis of AlgorithmsBinary Search - Design & Analysis of Algorithms
Binary Search - Design & Analysis of Algorithms
 
CNF & Leftmost Derivation - Theory of Computation
CNF & Leftmost Derivation - Theory of ComputationCNF & Leftmost Derivation - Theory of Computation
CNF & Leftmost Derivation - Theory of Computation
 

Último

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 

Último (20)

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 

Fd & Normalization - Database Management System

  • 1. FUNCTIONAL DEPENDENCIES AND NORMALIZATION PRESENTATION BY: SAUMYA TRIVEDI (1697) VANDANA VASHISTH (1831) DIMPY CHUGH (1833) DRISHTI BHALLA (1838)
  • 3. GUIDELINE 1: Design a relation schema so that it is easy to interpret its meaning relation by relation. • Do not combine attributes from multiple entity types and relationships types into a single relation. • Only foreign keys should be used to refer to other entities. INFORMAL DESIGN GUIDELINES FOR RELATIONAL DATABASES Semantics of the Relation Attributes
  • 4. One goal of schema design is to minimize the storage space that the base relations (files) occupy, but in case of presence of redundant information this can not be fulfilled. Another serious problem with redundancy is the problem of update anomalies. These can be classified into: •Insertion Anomalies •Deletion Anomalies •Modification Anomalies GUIDELINE 2: Design the base relation schemas so that no insertion, deletion , or modification anomalies occur in the relations. If any anomalies are present, note them clearly so that the programs that update the database will operate correctly  Redundant Information in Tuples
  • 5. ID Name Address Subject ID Subject Name Teacher 401 Adam London 01 Math M. Smith 402 Alex Austria 03 English L. Brown 403 Alice Germany 02 Physics P. James 404 George London 02 Physics P. James 405 Jennifer New York 05 History I. John
  • 6. ID Name Address Subject ID 401 Adam London 01 402 Alex Austria 03 403 Alice Germany 02 404 George London 02 405 Jennifer New York 05 Subject ID Subject Name Teacher 01 Math M. Smith 02 Physics P. James 03 English L. Brown 05 History I. John
  • 7. GUIDELINE 3: Avoid placing attributes in a relation whose values may be null. Reasons for nulls: • Attribute not applicable or invalid • Attribute value unknown (may exist) • Value known to exist, but unavailable  Null Values In Tuples
  • 8. A spurious tuple is, basically, a record in a database that gets created when two tables are joined badly. Spurious tuples are created when two tables are joined on attributes that are neither primary keys nor foreign keys. GUIDELINE 4: Design relation schemas so that they satisfy the lossless join condition and no spurious tuples are generated. ID Name Address 401 Adam London 402 Alex Austria 403 Alice Germany 404 George London  Spurious Tuples
  • 9. ID Address 401 London 402 Austria 403 Germany 404 London Address Name London Adam Austria Alex Germany Alice London George Natural Join ID Address Name 401 London Adam 401 London Gorge 402 Austria Alex 403 Germany Alice 404 London Adam 404 London George
  • 11. Functional Dependency(FD) is a set of constraints between attributes of a relation . Given a relation R, a set of attributes X in R is said to functionally determine another set of attributes Y, also in R, (written X → Y) if, and only if, each X value is associated with precisely one Y value; R is then said to satisfy the functional dependency X → Y. For any two tuples s1 and s2 in any relation instance r(R): If s1[X]=s2[X], then s1[Y]=s2[Y]. FUNCTIONAL DEPENDENCIES
  • 12. EXAMPLE OF FUNCTIONAL DEPENDENCIES Name Class Subject Age Pooja 5th English 10 Priya 4th Hindi 9 Pooja 5th Maths 10 Pooja 6th Science 10 Sneha 7th Computer 11 2. Class->Name, Class+Subject->Name+Subject 3. Class->Name, Name-> Age, Class->Age 4. Class->Name, Class->Age, Class->Name+Age 5. Class->Name+Age, Class-> Name, Class->Age 6. Class->Name, Name+Subject->Age, Class+subject->Age
  • 13. Rules of Inference for functional dependencies, called Armstrong axioms, can be used to find all the FDs logically implied by a set of FDs. Let A,B,C and D be subsets of attributes of a relation R then following are the different inference rules : 1.Reflexivity If B is a subset of A then, A->B. This also implies A->A always hold. 2.Augmentation: If we have AB then ACBC. 3.Transitivity: If AB and BC, then AC. 4.Additivity or Union: If AB and AC, then ABC. 5.Projectivity or Decomposition: If ABC then AB and AC. 6.Pseudo transitivity: If AB and CBD, then ACD. INFERENCE RULES OF FDs
  • 14. • Closure of a set F of FDs is the set of all FDs logically implied by F. Example : Suppose we are given a relation scheme R=(A,B,C,G,H,I) and the set of FDs as : F={AB,CGH,CGI,BH } Therefore, F + ={AH (By Transitivity), CGHI(By Additivity or Union)} INFERENCE RULES OF FDs
  • 15. EQUIVALENCE OF SETS OF FDs Two sets of FDs, F1 and F2 are equivalent if and only if- - every FD in F1 can be inferred from F2 - every FD in F2 can be inferred from F1 Example : Consider F1 = {A->B, B->H, A->H} & F2 = {A->B, B->H} F2 :A->A; A->B; A->H; F2 :B->B; B->H; F1 :A->A; A->B; A->H; F1 :BC; B->B; B->H; Since all FDs in F1 can be obtained from F2 and vice versa, we conclude that F1 and F2 are equivalent.
  • 16. MINIMAL SETS OF FDs A set of FDs is minimal if it satisfies the following conditions: 1).Every dependency in F has a single attribute for its RHS. 2).We cannot remove any dependency from F and have a set of dependencies that is equivalent to F. F={AB, BH, AH } F new={AB, BH } 3).We cannot replace any dependency X -> A in F with a dependency Y -> A, where Y proper-subset-of X ( Y subset-of X) and still have a set of dependencies that is equivalent to F.
  • 17. FULL AND PARTIAL FUNCTIONAL DEPENDENCY • Grade is fully functionally dependent on the primary key (ID, Course-ID) because both parts of the primary keys are needed to determine Grade. • On the other hand both Name and Phone attributes are partially dependent on the primary key, because only a part of the primary key namely ID is needed to determine them and similarly Credit-Hours and Course-Name can be determined using Course-ID . ID Name Phone Course ID Course Name Credit -Hours Grade
  • 19. Normalisation works through a series of stages called Normal Forms . Various Normal Forms are :  First Normal Form(1NF)  Second Normal Form(2NF)  Third Normal Form(3NF)  Boyce- Codd Normal Form(BCNF) Normalization is a step-by-step refinement process during which unsatisfactory or bad relations are decomposed by breaking up their attributes into smaller relations that possess desirable properties. NORMALIZATION NORMAL FORM
  • 20.  Reduces Data Redundancy.  Reduces the chances of Data Anomalies occurring.  Provides a robust architecture for retrieving and maintaining data.  Produces high quality relational schema designs. NORMALIZATION BENEFITS
  • 21. A Relation Schema R is said to be in 1NF when :-  The relation has a primary key.  The relation does not have composite attributes, multivalued attributes and nested relations .  The non-key attributes depend on the primary key. FIRST NORMAL FORM (1NF)
  • 22. EXAMPLE OF 1st NORMAL FORM Name Age Subject Alex 17 Math, Biology Adam 15 Physics Alice 16 Chemistry, Math Name Age Subject Alex 17 Math Alex 17 Biology Adam 15 Physics Alice 16 Chemistry Alice 16 Math
  • 23. A Relation Schema R is said to be in 2NF when: -  The relations meet the criteria for first normal form.  Every non-prime attribute A in R is fully functionally dependent on the primary key . SECOND NORMAL FORM (2NF)
  • 24. EXAMPLE OF 2nd NORMAL FORM Name Age Subject Alex 17 Math Alex 17 Biology Adam 15 Physics Alice 16 Chemistry Alice 16 Math Name Subject Alex Math Alex Biology Adam Physics Alice Chemistry Alice Math Name Age Alex 17 Adam 15 Alice 16
  • 25. A Relation Schema R is said to be in 3NF when :-  The relations meet the criteria for second normal form.  No non-prime attribute A in R is transitively dependent on the primary key. According to the general definition of 3NF for multiple candidate keys , A relation schema R is in 3NF if whenever a FD X -> A holds in R, then either: • X is a super key of R, or • A is a prime attribute of R THIRD NORMAL FORM (3NF)
  • 26. EXAMPLE OF 3rd NORMAL FORM ID Name DOB Street City State Zip Zip Street City StateID Name DOB Zip
  • 27. A Relation Schema R is said to be in BCNF  If whenever a FD X -> A holds in R, then X is a super key of R. BCNF is simply a stronger definition of 3NF. Every BCNF relation is in 3NF. BOYCE –CODD NORMAL FORM
  • 28. ID Name Address DOB City ID Name DOB City City Address EXAMPLE OF BOYCE CODD NORMAL FORM