SlideShare a Scribd company logo
2
Most read
3
Most read
12
Most read
Multivalued Dependency Tamer Abuelata
Introduction Goal in Databases: BCNF (Boyce Codd Normal Form) Losslessness Dependency preservation
Remember… Boyce Codd Normal Form (BCNF) eliminates all redundancy that can be discovered based on functional dependencies.
Issue Some relation schemas, even though they are in BCNF, do not seem to be  sufficiently normalized. They still contain  repetitions
Case study Consider the bank database schema: cust_loan = ( loan_number, cust_id , cust_name, cust_street, cust_city) This is BCNF because of the functional dependency: cust_id -> cust_name, cust_street cust_city And because cust_id is not a key for cust_loan
Case Study But what if some customers have several addresses? We no longer wish to enforce the func. dependency:  cust_id ->cust_street cust_city But we still want to enforce cust_id -> cust_name
Case Study Following BCNF decomposition algorithm we get: R1 = ( cust_id , cust_name) R2 = ( loan_number, cust_id , cust_street, cust_city) (both in BCNF)
Case Study The issue Despite R2 in BCNF, there is redundancy. We repeat the address of each residence for each loan that the customer has.
Case Study We can therefore  decompose further  into: loan_cust_id = (loan_number, cust_id) cust_residence = (cust_id, cust_street, cust_city) But there is no constraint that lead us to do that. To deal with this, we need a few form of constraint: 4NF.
4NF We can use multivalued dependencies to define the  fourth normal form
4NF A relation schema R is in fourth normal form with respect to a set D of functional and multivalued dependencies if, for all multivlued dependencies in D+ of the form A -->-> B at least one of the following holds: A -->-> B is a trivial multivalued dependency A is a superkey for schema R
Multivalued Dependency Requires that other tuples of a certain form be present in the relation. Multivalued Dependencies The  multivalued dependency  relates to this problem when more than one multivalued attributes exist. Also referred to as: tuple-generating dependency
Example R relation schema, A and B follow the  multivalued   dependency : A  -->->  B The relationship between A and B is independent of the relation between A and R – B If  A  -->->  B  is satisfied by all relations on R then   A  -->->  B  is a trivial multivalued dependency
Example Let’s reconsider R2 = ( loan_number, cust_id , cust_street, cust_city) loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-23 99-123 Main Manchester L-93 15-106 Lake Horseneck
Example We must  repeat the loan number  once for  each address  a customer has and we must  repeat the address  for  each loan  a customer has. loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-23 99-123 Main Manchester L-93 15-106 Lake Horseneck
Example We must  repeat the loan number  once for  each address  a customer has and we must  repeat the address  for  each loan  a customer has. This repetition is unnecessary since the relationship between a customer and his address is independent of the relationship between that customer and a loan. loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-23 99-123 Main Manchester L-93 15-106 Lake Horseneck
Example Therefore this relation is  illegal loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-27 99-123 Main Manchester
Example Therefore this relation is  illegal To make it legal we should add tuples (L23, 99-123, Main, Manchester) and (L27, 99-123, North, Rye) loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-27 99-123 Main Manchester
Example Updated table (legal) loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-27 99-123 Main Manchester L-23 99-123 Main Manchester L-27 99-123 North Rye
Example Updated table (legal) We want  Cust_id  -->->  cust_street cust_city to hold loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-27 99-123 Main Manchester L-23 99-123 Main Manchester L-27 99-123 North Rye
Conclusion We can use multivalued dependencies To test relations to determine whether they are legal under a given set of functional and multivalued dependencies To specify constraints on the set of legal relations

More Related Content

PPTX
Concurrency Control in Database Management System
PPTX
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
PPTX
Software myths | Software Engineering Notes
PPTX
SQL, Embedded SQL, Dynamic SQL and SQLJ
PPTX
And or graph
PPT
predicate logic example
PPT
Type Checking(Compiler Design) #ShareThisIfYouLike
PPT
Introduction to Compiler design
Concurrency Control in Database Management System
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Software myths | Software Engineering Notes
SQL, Embedded SQL, Dynamic SQL and SQLJ
And or graph
predicate logic example
Type Checking(Compiler Design) #ShareThisIfYouLike
Introduction to Compiler design

What's hot (20)

PPT
Er & eer to relational mapping
PDF
Triggers and Stored Procedures
PPT
Enhanced E-R diagram
PPTX
Distributed database
PPT
Relational algebra in dbms
PPT
Scheduling algorithms
PPTX
Control Strategies in AI
PPTX
Predicate logic
PPTX
Cost estimation for Query Optimization
PPTX
Concurrency control
DOCX
Concurrency Control Techniques
PPTX
Software process
PPT
Operating system services 9
PPTX
Code generation
PDF
Major and Minor Elements of Object Model
PPT
32 dynamic linking nd overlays
PPT
Formal Specification in Software Engineering SE9
PPT
Uml in software engineering
PPTX
Graph Traversal Algorithm
Er & eer to relational mapping
Triggers and Stored Procedures
Enhanced E-R diagram
Distributed database
Relational algebra in dbms
Scheduling algorithms
Control Strategies in AI
Predicate logic
Cost estimation for Query Optimization
Concurrency control
Concurrency Control Techniques
Software process
Operating system services 9
Code generation
Major and Minor Elements of Object Model
32 dynamic linking nd overlays
Formal Specification in Software Engineering SE9
Uml in software engineering
Graph Traversal Algorithm
Ad

Viewers also liked (20)

PDF
Multi Valued Dependency
PPT
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
PDF
Database design & Normalization (1NF, 2NF, 3NF)
PPTX
Functional dependencies and normalization
PPTX
Functional dependency
PPTX
Normalization
PPT
DBMS - Normalization
PPT
Databases: Normalisation
PPTX
DBMS Lecture 8 - Normalization
PPTX
Dbms normalization
PPTX
Theory of dependencies in relational database
PPTX
Dbms 4NF & 5NF
PPT
Design challenges in physical design
PPTX
Normalization 1 nf,2nf,3nf,bcnf
PDF
Normalization in Database
PPTX
Functional dependencies and normalization for relational databases
PPTX
Normalization in DBMS
PPSX
ARIES Recovery Algorithms
PPTX
Entity relationship diagram - Concept on normalization
Multi Valued Dependency
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database design & Normalization (1NF, 2NF, 3NF)
Functional dependencies and normalization
Functional dependency
Normalization
DBMS - Normalization
Databases: Normalisation
DBMS Lecture 8 - Normalization
Dbms normalization
Theory of dependencies in relational database
Dbms 4NF & 5NF
Design challenges in physical design
Normalization 1 nf,2nf,3nf,bcnf
Normalization in Database
Functional dependencies and normalization for relational databases
Normalization in DBMS
ARIES Recovery Algorithms
Entity relationship diagram - Concept on normalization
Ad

Similar to Multivalued dependency (20)

PDF
Lecture Notes Unit2 chapter7 RelationalDatabaseDesign
PPT
Design of databases
PPTX
UNIT 2 -PPT.pptx
PPT
Chapter10
PPT
4 nf 5 nf l #27 28
PPTX
Functional dependancy
PPT
Normalization
PPTX
data dependency in relational database management
PPT
Normalization DBMS.ppt
PPTX
Normalization.pptx Functional dependence
PDF
DAtaBase DAtaBaseDAtaBase Chapter14.pdf
PDF
17-Relational Design Algorithms-07-06-2023.pdf
PPT
Chapter14
PPT
Normalisation of something i dont know and will never know
PPT
Normalization basde dON SHDIEHGFJSGDFGI
PPT
free Video lecture in India
PPT
Normalization
PPT
Normalization in dbms -1nf,2nf,3nf .ppt
Lecture Notes Unit2 chapter7 RelationalDatabaseDesign
Design of databases
UNIT 2 -PPT.pptx
Chapter10
4 nf 5 nf l #27 28
Functional dependancy
Normalization
data dependency in relational database management
Normalization DBMS.ppt
Normalization.pptx Functional dependence
DAtaBase DAtaBaseDAtaBase Chapter14.pdf
17-Relational Design Algorithms-07-06-2023.pdf
Chapter14
Normalisation of something i dont know and will never know
Normalization basde dON SHDIEHGFJSGDFGI
free Video lecture in India
Normalization
Normalization in dbms -1nf,2nf,3nf .ppt

More from avniS (9)

PPT
Transaction unit 1 topic 4
PPT
Transaction unit1 topic 2
PPT
Sequences
PPT
Normalization
PPT
Locks with updt nowait
PPT
Locking unit 1 topic 3
PPT
3 phases in transactions 3 units
PPT
Overview of query evaluation
PPT
Changing trends in sw development
Transaction unit 1 topic 4
Transaction unit1 topic 2
Sequences
Normalization
Locks with updt nowait
Locking unit 1 topic 3
3 phases in transactions 3 units
Overview of query evaluation
Changing trends in sw development

Recently uploaded (20)

PDF
Power and position in leadershipDOC-20250808-WA0011..pdf
PDF
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
PDF
IFRS Notes in your pocket for study all the time
PPTX
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
PDF
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
PDF
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
PPTX
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
PPTX
Amazon (Business Studies) management studies
PPT
Chapter four Project-Preparation material
PDF
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
PDF
NewBase 12 August 2025 Energy News issue - 1812 by Khaled Al Awadi_compresse...
DOCX
Business Management - unit 1 and 2
DOCX
unit 2 cost accounting- Tender and Quotation & Reconciliation Statement
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PPTX
HR Introduction Slide (1).pptx on hr intro
PPTX
2025 Product Deck V1.0.pptxCATALOGTCLCIA
PDF
How to Get Funding for Your Trucking Business
PPTX
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
PDF
Deliverable file - Regulatory guideline analysis.pdf
PPTX
New Microsoft PowerPoint Presentation - Copy.pptx
Power and position in leadershipDOC-20250808-WA0011..pdf
SIMNET Inc – 2023’s Most Trusted IT Services & Solution Provider
IFRS Notes in your pocket for study all the time
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
BsN 7th Sem Course GridNNNNNNNN CCN.pdf
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
Amazon (Business Studies) management studies
Chapter four Project-Preparation material
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
NewBase 12 August 2025 Energy News issue - 1812 by Khaled Al Awadi_compresse...
Business Management - unit 1 and 2
unit 2 cost accounting- Tender and Quotation & Reconciliation Statement
Reconciliation AND MEMORANDUM RECONCILATION
HR Introduction Slide (1).pptx on hr intro
2025 Product Deck V1.0.pptxCATALOGTCLCIA
How to Get Funding for Your Trucking Business
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
Deliverable file - Regulatory guideline analysis.pdf
New Microsoft PowerPoint Presentation - Copy.pptx

Multivalued dependency

  • 2. Introduction Goal in Databases: BCNF (Boyce Codd Normal Form) Losslessness Dependency preservation
  • 3. Remember… Boyce Codd Normal Form (BCNF) eliminates all redundancy that can be discovered based on functional dependencies.
  • 4. Issue Some relation schemas, even though they are in BCNF, do not seem to be sufficiently normalized. They still contain repetitions
  • 5. Case study Consider the bank database schema: cust_loan = ( loan_number, cust_id , cust_name, cust_street, cust_city) This is BCNF because of the functional dependency: cust_id -> cust_name, cust_street cust_city And because cust_id is not a key for cust_loan
  • 6. Case Study But what if some customers have several addresses? We no longer wish to enforce the func. dependency: cust_id ->cust_street cust_city But we still want to enforce cust_id -> cust_name
  • 7. Case Study Following BCNF decomposition algorithm we get: R1 = ( cust_id , cust_name) R2 = ( loan_number, cust_id , cust_street, cust_city) (both in BCNF)
  • 8. Case Study The issue Despite R2 in BCNF, there is redundancy. We repeat the address of each residence for each loan that the customer has.
  • 9. Case Study We can therefore decompose further into: loan_cust_id = (loan_number, cust_id) cust_residence = (cust_id, cust_street, cust_city) But there is no constraint that lead us to do that. To deal with this, we need a few form of constraint: 4NF.
  • 10. 4NF We can use multivalued dependencies to define the fourth normal form
  • 11. 4NF A relation schema R is in fourth normal form with respect to a set D of functional and multivalued dependencies if, for all multivlued dependencies in D+ of the form A -->-> B at least one of the following holds: A -->-> B is a trivial multivalued dependency A is a superkey for schema R
  • 12. Multivalued Dependency Requires that other tuples of a certain form be present in the relation. Multivalued Dependencies The  multivalued dependency  relates to this problem when more than one multivalued attributes exist. Also referred to as: tuple-generating dependency
  • 13. Example R relation schema, A and B follow the multivalued dependency : A -->-> B The relationship between A and B is independent of the relation between A and R – B If A -->-> B is satisfied by all relations on R then A -->-> B is a trivial multivalued dependency
  • 14. Example Let’s reconsider R2 = ( loan_number, cust_id , cust_street, cust_city) loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-23 99-123 Main Manchester L-93 15-106 Lake Horseneck
  • 15. Example We must repeat the loan number once for each address a customer has and we must repeat the address for each loan a customer has. loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-23 99-123 Main Manchester L-93 15-106 Lake Horseneck
  • 16. Example We must repeat the loan number once for each address a customer has and we must repeat the address for each loan a customer has. This repetition is unnecessary since the relationship between a customer and his address is independent of the relationship between that customer and a loan. loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-23 99-123 Main Manchester L-93 15-106 Lake Horseneck
  • 17. Example Therefore this relation is illegal loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-27 99-123 Main Manchester
  • 18. Example Therefore this relation is illegal To make it legal we should add tuples (L23, 99-123, Main, Manchester) and (L27, 99-123, North, Rye) loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-27 99-123 Main Manchester
  • 19. Example Updated table (legal) loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-27 99-123 Main Manchester L-23 99-123 Main Manchester L-27 99-123 North Rye
  • 20. Example Updated table (legal) We want Cust_id -->-> cust_street cust_city to hold loan_number cust_id cust_street cust_city L-23 99-123 North Rye L-27 99-123 Main Manchester L-23 99-123 Main Manchester L-27 99-123 North Rye
  • 21. Conclusion We can use multivalued dependencies To test relations to determine whether they are legal under a given set of functional and multivalued dependencies To specify constraints on the set of legal relations