SlideShare a Scribd company logo
Appendix C: Advanced Relational Database
                                    Design

                  s Reasoning with MVDs
                  s Higher normal forms
                         q   Join dependencies and PJNF
                         q   DKNF




Database System Concepts, 1 st Ed.                 C.1   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Theory of Multivalued Dependencies
            s Let D denote a set of functional and multivalued dependencies. The
                 closure D+ of D is the set of all functional and multivalued
                 dependencies logically implied by D.
            s Sound and complete inference rules for functional and multivalued
                 dependencies:
            1. Reflexivity rule. If α is a set of attributes and β ⊆ α, then α →β
               holds.
            2. Augmentation rule. If α → β holds and γ is a set of attributes, then
               γ α→γ β holds.
            3. Transitivity rule. If α → β holds and γ α→γ β holds, then α →γ
               holds.




Database System Concepts, 1 st Ed.                 C.2   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Theory of Multivalued Dependencies
                                   (Cont.)

                   4. Complementation rule. If α            β holds, then α               R–β–α
                      holds.
                   5. Multivalued augmentation rule. If α                 β holds and γ ⊆ R
                      and δ ⊆ γ, then γ α δ β holds.
                   6. Multivalued transitivity rule. If α            β holds and β               γ
                      holds, then α  γ – β holds.
                   7. Replication rule. If α      β holds, then α             β.
                   8. Coalescence rule. If α        β holds and γ ⊆ β and there is a δ
                      such that δ ⊆ R and δ ∩ β = ∅ and δ    γ, then α    γ holds.




Database System Concepts, 1 st Ed.                C.3   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Simplification of the Computation of
                                 D+

        s We can simplify the computation of the closure of D by using the following
             rules (proved using rules 1-8).
               q   Multivalued union rule. If α          β holds and α               γ holds, then
                   α     βγ holds.
               q   Intersection rule. If α     β holds and α              γ holds, then α              β∩γ
                   holds.
               q   Difference rule. If If α   β holds and α             γ holds, then α              β–γ
                   holds and α   γ – β holds.




Database System Concepts, 1 st Ed.                C.4   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Example

                   s R = (A, B, C, G, H, I)
                        D = {A        B
                           B         HI
                           CG        H}
                   s Some members of D+:
                          q   A    CGHI.
                              Since A    B, the complementation rule (4) implies that
                              A    R – B – A.
                              Since R – B – A = CGHI, so A    CGHI.
                          q   A      HI.
                              Since A       B and B      HI, the multivalued transitivity
                              rule (6) implies that B    HI – B.
                              Since HI – B = HI, A       HI.




Database System Concepts, 1 st Ed.                      C.5   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Example (Cont.)
            s Some members of D+ (cont.):
                   q   B    H.
                       Apply the coalescence rule (8); B       HI holds.
                       Since H ⊆ HI and CG       H and CG ∩ HI = Ø the
                                                                     ,
                       coalescence rule is satisfied with α being B, β being HI, δ being
                       CG, and γ being H. We conclude that B H.
                   q   A     CG.
                       A     CGHI and A        HI.
                       By the difference rule, A     CGHI – HI.
                       Since CGHI – HI = CG, A        CG.




Database System Concepts, 1 st Ed.                   C.6   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Normalization Using Join
                                  Dependencies
       s Join dependencies constrain the set of legal relations over a schema R to
            those relations for which a given decomposition is a lossless-join
            decomposition.
       s Let R be a relation schema and R1 , R2 ,..., Rn be a decomposition of R. If R =
            R1 ∪ R2 ∪ … ∪ Rn, we say that a relation r(R) satisfies the join dependency
                           .
            *(R1 , R2 ,..., Rn) if:
                    r =∏R1 (r) ⋈ ∏R2 (r) ⋈ …… ⋈ ∏Rn(r)
            A join dependency is trivial if one of the Ri is R itself.
       s A join dependency *(R1, R2) is equivalent to the multivalued dependency R1 ∩
            R2         R2. Conversely, α     β is equivalent to         *(α ∪(R - β), α ∪ β)
       s However, there are join dependencies that are not equivalent to any
            multivalued dependency.




Database System Concepts, 1 st Ed.                  C.7   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Project-Join Normal Form (PJNF)
         s A relation schema R is in PJNF with respect to a set D of functional,
              multivalued, and join dependencies if for all join dependencies in D+ of the
              form
                    *(R1 , R2 ,..., Rn ) where each Ri ⊆ R
                    and R =R1∪ R2 ∪ ... ∪ Rn
              at least one of the following holds:
               q    *(R1 , R2 ,..., Rn ) is a trivial join dependency.
               q    Every Ri is a superkey for R.
         s Since every multivalued dependency is also a join dependency,
              every PJNF schema is also in 4NF.




Database System Concepts, 1 st Ed.                     C.8   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Example
         s Consider Loan-info-schema = (branch-name, customer-name, loan-number,
              amount).
         s Each loan has one or more customers, is in one or more branches and has
              a loan amount; these relationships are independent, hence we have the join
              dependency
         s *(=(loan-number, branch-name), (loan-number, customer-name), (loan-
              number, amount))
         s Loan-info-schema is not in PJNF with respect to the set of dependencies
              containing the above join dependency. To put Loan-info-schema into PJNF,
              we must decompose it into the three schemas specified by the join
              dependency:
               q    (loan-number, branch-name)
               q    (loan-number, customer-name)
               q    (loan-number, amount)




Database System Concepts, 1 st Ed.                 C.9   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Domain-Key Normal Form (DKNY)
            s Domain declaration. Let A be an attribute, and let dom be a set of
                 values. The domain declaration A ⊆ dom requires that the A value of
                 all tuples be values in dom.
            s Key declaration. Let R be a relation schema with K ⊆ R. The key
                 declaration key (K) requires that K be a superkey for schema R (K →
                 R). All key declarations are functional dependencies but not all
                 functional dependencies are key declarations.
            s General constraint. A general constraint is a predicate on the set
                 of all relations on a given schema.
            s Let D be a set of domain constraints and let K be a set of key
                 constraints for a relation schema R. Let G denote the general
                 constraints for R. Schema R is in DKNF if D ∪ K logically imply G.




Database System Concepts, 1 st Ed.                C.10   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
Example
            s Accounts whose account-number begins with the digit 9 are special
                 high-interest accounts with a minimum balance of 2500.
            s General constraint: ``If the first digit of t [account-number] is 9, then t
                 [balance] ≥ 2500.''
            s DKNF design:
                       Regular-acct-schema = (branch-name, account-number,
                       balance)
                       Special-acct-schema = (branch-name, account-number,
                       balance)
            s Domain constraints for {Special-acct-schema} require that for each
                 account:
                   q   The account number begins with 9.
                   q   The balance is greater than 2500.




Database System Concepts, 1 st Ed.                 C.11   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
DKNF rephrasing of PJNF Definition
            s Let R = (A1 , A2 ,..., An) be a relation schema. Let dom(Ai ) denote the
                 domain of attribute Ai, and let all these domains be infinite. Then all
                 domain constraints D are of the form Ai ⊆ dom (Ai ).
            s Let the general constraints be a set G of functional, multivalued, or
                 join dependencies. If F is the set of functional dependencies in G, let
                 the set K of key constraints be those nontrivial functional
                 dependencies in F+ of the form α → R.
            s Schema R is in PJNF if and only if it is in DKNF with respect to D, K,
                 and G.




Database System Concepts, 1 st Ed.                 C.12   ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100

More Related Content

More from sriprasoon

VNSISPL_DBMS_Concepts_ch25
VNSISPL_DBMS_Concepts_ch25VNSISPL_DBMS_Concepts_ch25
VNSISPL_DBMS_Concepts_ch25
sriprasoon
 
VNSISPL_DBMS_Concepts_ch24
VNSISPL_DBMS_Concepts_ch24VNSISPL_DBMS_Concepts_ch24
VNSISPL_DBMS_Concepts_ch24
sriprasoon
 
VNSISPL_DBMS_Concepts_ch23
VNSISPL_DBMS_Concepts_ch23VNSISPL_DBMS_Concepts_ch23
VNSISPL_DBMS_Concepts_ch23
sriprasoon
 
VNSISPL_DBMS_Concepts_ch22
VNSISPL_DBMS_Concepts_ch22VNSISPL_DBMS_Concepts_ch22
VNSISPL_DBMS_Concepts_ch22
sriprasoon
 
VNSISPL_DBMS_Concepts_ch21
VNSISPL_DBMS_Concepts_ch21VNSISPL_DBMS_Concepts_ch21
VNSISPL_DBMS_Concepts_ch21
sriprasoon
 
VNSISPL_DBMS_Concepts_ch20
VNSISPL_DBMS_Concepts_ch20VNSISPL_DBMS_Concepts_ch20
VNSISPL_DBMS_Concepts_ch20
sriprasoon
 
VNSISPL_DBMS_Concepts_ch19
VNSISPL_DBMS_Concepts_ch19VNSISPL_DBMS_Concepts_ch19
VNSISPL_DBMS_Concepts_ch19
sriprasoon
 
VNSISPL_DBMS_Concepts_ch18
VNSISPL_DBMS_Concepts_ch18VNSISPL_DBMS_Concepts_ch18
VNSISPL_DBMS_Concepts_ch18
sriprasoon
 
VNSISPL_DBMS_Concepts_ch17
VNSISPL_DBMS_Concepts_ch17VNSISPL_DBMS_Concepts_ch17
VNSISPL_DBMS_Concepts_ch17
sriprasoon
 
VNSISPL_DBMS_Concepts_ch16
VNSISPL_DBMS_Concepts_ch16VNSISPL_DBMS_Concepts_ch16
VNSISPL_DBMS_Concepts_ch16
sriprasoon
 
VNSISPL_DBMS_Concepts_ch15
VNSISPL_DBMS_Concepts_ch15VNSISPL_DBMS_Concepts_ch15
VNSISPL_DBMS_Concepts_ch15
sriprasoon
 
VNSISPL_DBMS_Concepts_ch14
VNSISPL_DBMS_Concepts_ch14VNSISPL_DBMS_Concepts_ch14
VNSISPL_DBMS_Concepts_ch14
sriprasoon
 
VNSISPL_DBMS_Concepts_ch13
VNSISPL_DBMS_Concepts_ch13VNSISPL_DBMS_Concepts_ch13
VNSISPL_DBMS_Concepts_ch13
sriprasoon
 
VNSISPL_DBMS_Concepts_ch12
VNSISPL_DBMS_Concepts_ch12VNSISPL_DBMS_Concepts_ch12
VNSISPL_DBMS_Concepts_ch12
sriprasoon
 
VNSISPL_DBMS_Concepts_ch11
VNSISPL_DBMS_Concepts_ch11VNSISPL_DBMS_Concepts_ch11
VNSISPL_DBMS_Concepts_ch11
sriprasoon
 
VNSISPL_DBMS_Concepts_ch10
VNSISPL_DBMS_Concepts_ch10VNSISPL_DBMS_Concepts_ch10
VNSISPL_DBMS_Concepts_ch10
sriprasoon
 
VNSISPL_DBMS_Concepts_ch9
VNSISPL_DBMS_Concepts_ch9VNSISPL_DBMS_Concepts_ch9
VNSISPL_DBMS_Concepts_ch9
sriprasoon
 
VNSISPL_DBMS_Concepts_ch8
VNSISPL_DBMS_Concepts_ch8VNSISPL_DBMS_Concepts_ch8
VNSISPL_DBMS_Concepts_ch8
sriprasoon
 
VNSISPL_DBMS_Concepts_ch5
VNSISPL_DBMS_Concepts_ch5VNSISPL_DBMS_Concepts_ch5
VNSISPL_DBMS_Concepts_ch5
sriprasoon
 
VNSISPL_DBMS_Concepts_ch4
VNSISPL_DBMS_Concepts_ch4VNSISPL_DBMS_Concepts_ch4
VNSISPL_DBMS_Concepts_ch4
sriprasoon
 

More from sriprasoon (20)

VNSISPL_DBMS_Concepts_ch25
VNSISPL_DBMS_Concepts_ch25VNSISPL_DBMS_Concepts_ch25
VNSISPL_DBMS_Concepts_ch25
 
VNSISPL_DBMS_Concepts_ch24
VNSISPL_DBMS_Concepts_ch24VNSISPL_DBMS_Concepts_ch24
VNSISPL_DBMS_Concepts_ch24
 
VNSISPL_DBMS_Concepts_ch23
VNSISPL_DBMS_Concepts_ch23VNSISPL_DBMS_Concepts_ch23
VNSISPL_DBMS_Concepts_ch23
 
VNSISPL_DBMS_Concepts_ch22
VNSISPL_DBMS_Concepts_ch22VNSISPL_DBMS_Concepts_ch22
VNSISPL_DBMS_Concepts_ch22
 
VNSISPL_DBMS_Concepts_ch21
VNSISPL_DBMS_Concepts_ch21VNSISPL_DBMS_Concepts_ch21
VNSISPL_DBMS_Concepts_ch21
 
VNSISPL_DBMS_Concepts_ch20
VNSISPL_DBMS_Concepts_ch20VNSISPL_DBMS_Concepts_ch20
VNSISPL_DBMS_Concepts_ch20
 
VNSISPL_DBMS_Concepts_ch19
VNSISPL_DBMS_Concepts_ch19VNSISPL_DBMS_Concepts_ch19
VNSISPL_DBMS_Concepts_ch19
 
VNSISPL_DBMS_Concepts_ch18
VNSISPL_DBMS_Concepts_ch18VNSISPL_DBMS_Concepts_ch18
VNSISPL_DBMS_Concepts_ch18
 
VNSISPL_DBMS_Concepts_ch17
VNSISPL_DBMS_Concepts_ch17VNSISPL_DBMS_Concepts_ch17
VNSISPL_DBMS_Concepts_ch17
 
VNSISPL_DBMS_Concepts_ch16
VNSISPL_DBMS_Concepts_ch16VNSISPL_DBMS_Concepts_ch16
VNSISPL_DBMS_Concepts_ch16
 
VNSISPL_DBMS_Concepts_ch15
VNSISPL_DBMS_Concepts_ch15VNSISPL_DBMS_Concepts_ch15
VNSISPL_DBMS_Concepts_ch15
 
VNSISPL_DBMS_Concepts_ch14
VNSISPL_DBMS_Concepts_ch14VNSISPL_DBMS_Concepts_ch14
VNSISPL_DBMS_Concepts_ch14
 
VNSISPL_DBMS_Concepts_ch13
VNSISPL_DBMS_Concepts_ch13VNSISPL_DBMS_Concepts_ch13
VNSISPL_DBMS_Concepts_ch13
 
VNSISPL_DBMS_Concepts_ch12
VNSISPL_DBMS_Concepts_ch12VNSISPL_DBMS_Concepts_ch12
VNSISPL_DBMS_Concepts_ch12
 
VNSISPL_DBMS_Concepts_ch11
VNSISPL_DBMS_Concepts_ch11VNSISPL_DBMS_Concepts_ch11
VNSISPL_DBMS_Concepts_ch11
 
VNSISPL_DBMS_Concepts_ch10
VNSISPL_DBMS_Concepts_ch10VNSISPL_DBMS_Concepts_ch10
VNSISPL_DBMS_Concepts_ch10
 
VNSISPL_DBMS_Concepts_ch9
VNSISPL_DBMS_Concepts_ch9VNSISPL_DBMS_Concepts_ch9
VNSISPL_DBMS_Concepts_ch9
 
VNSISPL_DBMS_Concepts_ch8
VNSISPL_DBMS_Concepts_ch8VNSISPL_DBMS_Concepts_ch8
VNSISPL_DBMS_Concepts_ch8
 
VNSISPL_DBMS_Concepts_ch5
VNSISPL_DBMS_Concepts_ch5VNSISPL_DBMS_Concepts_ch5
VNSISPL_DBMS_Concepts_ch5
 
VNSISPL_DBMS_Concepts_ch4
VNSISPL_DBMS_Concepts_ch4VNSISPL_DBMS_Concepts_ch4
VNSISPL_DBMS_Concepts_ch4
 

Recently uploaded

The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 

Recently uploaded (20)

The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 

VNSISPL_DBMS_Concepts_AppC

  • 1. Appendix C: Advanced Relational Database Design s Reasoning with MVDs s Higher normal forms q Join dependencies and PJNF q DKNF Database System Concepts, 1 st Ed. C.1 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 2. Theory of Multivalued Dependencies s Let D denote a set of functional and multivalued dependencies. The closure D+ of D is the set of all functional and multivalued dependencies logically implied by D. s Sound and complete inference rules for functional and multivalued dependencies: 1. Reflexivity rule. If α is a set of attributes and β ⊆ α, then α →β holds. 2. Augmentation rule. If α → β holds and γ is a set of attributes, then γ α→γ β holds. 3. Transitivity rule. If α → β holds and γ α→γ β holds, then α →γ holds. Database System Concepts, 1 st Ed. C.2 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 3. Theory of Multivalued Dependencies (Cont.) 4. Complementation rule. If α β holds, then α R–β–α holds. 5. Multivalued augmentation rule. If α β holds and γ ⊆ R and δ ⊆ γ, then γ α δ β holds. 6. Multivalued transitivity rule. If α β holds and β γ holds, then α γ – β holds. 7. Replication rule. If α β holds, then α β. 8. Coalescence rule. If α β holds and γ ⊆ β and there is a δ such that δ ⊆ R and δ ∩ β = ∅ and δ γ, then α γ holds. Database System Concepts, 1 st Ed. C.3 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 4. Simplification of the Computation of D+ s We can simplify the computation of the closure of D by using the following rules (proved using rules 1-8). q Multivalued union rule. If α β holds and α γ holds, then α βγ holds. q Intersection rule. If α β holds and α γ holds, then α β∩γ holds. q Difference rule. If If α β holds and α γ holds, then α β–γ holds and α γ – β holds. Database System Concepts, 1 st Ed. C.4 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 5. Example s R = (A, B, C, G, H, I) D = {A B B HI CG H} s Some members of D+: q A CGHI. Since A B, the complementation rule (4) implies that A R – B – A. Since R – B – A = CGHI, so A CGHI. q A HI. Since A B and B HI, the multivalued transitivity rule (6) implies that B HI – B. Since HI – B = HI, A HI. Database System Concepts, 1 st Ed. C.5 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 6. Example (Cont.) s Some members of D+ (cont.): q B H. Apply the coalescence rule (8); B HI holds. Since H ⊆ HI and CG H and CG ∩ HI = Ø the , coalescence rule is satisfied with α being B, β being HI, δ being CG, and γ being H. We conclude that B H. q A CG. A CGHI and A HI. By the difference rule, A CGHI – HI. Since CGHI – HI = CG, A CG. Database System Concepts, 1 st Ed. C.6 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 7. Normalization Using Join Dependencies s Join dependencies constrain the set of legal relations over a schema R to those relations for which a given decomposition is a lossless-join decomposition. s Let R be a relation schema and R1 , R2 ,..., Rn be a decomposition of R. If R = R1 ∪ R2 ∪ … ∪ Rn, we say that a relation r(R) satisfies the join dependency . *(R1 , R2 ,..., Rn) if: r =∏R1 (r) ⋈ ∏R2 (r) ⋈ …… ⋈ ∏Rn(r) A join dependency is trivial if one of the Ri is R itself. s A join dependency *(R1, R2) is equivalent to the multivalued dependency R1 ∩ R2 R2. Conversely, α β is equivalent to *(α ∪(R - β), α ∪ β) s However, there are join dependencies that are not equivalent to any multivalued dependency. Database System Concepts, 1 st Ed. C.7 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 8. Project-Join Normal Form (PJNF) s A relation schema R is in PJNF with respect to a set D of functional, multivalued, and join dependencies if for all join dependencies in D+ of the form *(R1 , R2 ,..., Rn ) where each Ri ⊆ R and R =R1∪ R2 ∪ ... ∪ Rn at least one of the following holds: q *(R1 , R2 ,..., Rn ) is a trivial join dependency. q Every Ri is a superkey for R. s Since every multivalued dependency is also a join dependency, every PJNF schema is also in 4NF. Database System Concepts, 1 st Ed. C.8 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 9. Example s Consider Loan-info-schema = (branch-name, customer-name, loan-number, amount). s Each loan has one or more customers, is in one or more branches and has a loan amount; these relationships are independent, hence we have the join dependency s *(=(loan-number, branch-name), (loan-number, customer-name), (loan- number, amount)) s Loan-info-schema is not in PJNF with respect to the set of dependencies containing the above join dependency. To put Loan-info-schema into PJNF, we must decompose it into the three schemas specified by the join dependency: q (loan-number, branch-name) q (loan-number, customer-name) q (loan-number, amount) Database System Concepts, 1 st Ed. C.9 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 10. Domain-Key Normal Form (DKNY) s Domain declaration. Let A be an attribute, and let dom be a set of values. The domain declaration A ⊆ dom requires that the A value of all tuples be values in dom. s Key declaration. Let R be a relation schema with K ⊆ R. The key declaration key (K) requires that K be a superkey for schema R (K → R). All key declarations are functional dependencies but not all functional dependencies are key declarations. s General constraint. A general constraint is a predicate on the set of all relations on a given schema. s Let D be a set of domain constraints and let K be a set of key constraints for a relation schema R. Let G denote the general constraints for R. Schema R is in DKNF if D ∪ K logically imply G. Database System Concepts, 1 st Ed. C.10 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 11. Example s Accounts whose account-number begins with the digit 9 are special high-interest accounts with a minimum balance of 2500. s General constraint: ``If the first digit of t [account-number] is 9, then t [balance] ≥ 2500.'' s DKNF design: Regular-acct-schema = (branch-name, account-number, balance) Special-acct-schema = (branch-name, account-number, balance) s Domain constraints for {Special-acct-schema} require that for each account: q The account number begins with 9. q The balance is greater than 2500. Database System Concepts, 1 st Ed. C.11 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100
  • 12. DKNF rephrasing of PJNF Definition s Let R = (A1 , A2 ,..., An) be a relation schema. Let dom(Ai ) denote the domain of attribute Ai, and let all these domains be infinite. Then all domain constraints D are of the form Ai ⊆ dom (Ai ). s Let the general constraints be a set G of functional, multivalued, or join dependencies. If F is the set of functional dependencies in G, let the set K of key constraints be those nontrivial functional dependencies in F+ of the form α → R. s Schema R is in PJNF if and only if it is in DKNF with respect to D, K, and G. Database System Concepts, 1 st Ed. C.12 ©VNS InfoSolutions Private Limited, Varanasi(UP), India 22100