This action might not be possible to undo. Are you sure you want to continue?

Professor Navneet Goyal Department of Computer Science & Information Systems BITS, Pilani

Topics

Database Design Steps Redundancy Schema Refinement

Minimizing Redundancy

**Functional Dependencies (FDs) Normalization using FDs
**

First Normal Form (1NF) Second Normal Form (2NF) Third Normal Form (3NF) Boyce-Codd Normal Form (BCNF)

© Prof. Navneet Goyal, BITS, Pilani

**Database Design Steps
**

Requirements Analysis Conceptual Modeling (ER Model) Logical Modeling (Relational Model) Schema Refinement (Normalization)

© Prof. Navneet Goyal, BITS, Pilani

Redundancy Same information at many places in the DB Problems: Wastage of Space Update Anomalies Update Anomaly Insert Anomaly Delete Anomaly Normalization is used for ³minimizing´ redundancy © Prof. BITS. Pilani . Navneet Goyal.

No_hours) Update Anomaly: Changing the name of project number P1 from ³Billing´ to ³Customer-Accounting´ may cause this update to be made for all 100 employees working on project P1 Cannot insert a project unless an employee is assigned to it Inversely . Proj#.Cannot insert an employee unless he/she is assigned to a project. BITS. Pname. Navneet Goyal. Insert Anomaly: © Prof. Ename.Update Anomalies Consider the relation: EMP_PROJ ( Emp#. Pilani .

it will result in deleting all the employees who work on that project. Proj#. Alternately. Pname. Navneet Goyal.Update Anomalies Consider the relation: EMP_PROJ ( Emp#. BITS. if an employee is the sole employee on a project. Ename. Pilani . deleting that employee would result in deleting the corresponding project © Prof. No_hours) Delete Anomaly: When a project is deleted.

Navneet Goyal. Ename) PROJ (Proj#. No_hours) Into the following smaller relations: EMP (Emp#. Pilani . BITS. No_hours) What happened to update anomalies? We need to find out the basis for decomposing a relation to get rid of update anomalies © Prof. Pname. Proj#.Solution Decompose the relation: EMP_PROJ ( Emp#. Ename. Proj#. Pname) EMP_PROJ ( Emp#.

Pilani . Main refinement technique: decomposition (replacing ABCD with. Decomposition should be used judiciously: Is there a reason to decompose a relation? What problems (if any) does the decomposition cause? © Prof. Navneet Goyal. or ACD and ABD). can be used to identify schemas with such problems and to suggest refinements. BITS. in particular functional dependencies.Redundancy Integrity constraints. AB and BCD. say.

Pilani . BITS. Navneet Goyal.Functional Dependencies Constraints on the set of legal relations Require that the value for a certain set of attributes determines uniquely the value for another set of attributes A functional dependency is a generalization of the notion of a key © Prof.

given two tuples in r. but we cannot tell if f holds over R! K is a candidate key for R means that K p R However. for every allowable instance r of R: t1 r. then the Y values must also agree. K p R does© Prof. Pilani . Given some allowable instance r1 of R. t2 r.. T (t1) = T X (t2) implies T Y (t1) = T Y X (t2) i.be minimal! not to Navneet Goyal.require K BITS. if the X values agree. (X and Y are sets of attributes.) An FD is a statement about all allowable instances of a relation Must be identified based on semantics of application. we can check if it violates some FD f.Functional Dependencies A functional dependency X p Y holds over relation R if.e.

That is. but B p A does hold. they also agree on the attributes F. t1[E] = t2 [E] t1[F ] = t2 [F ] Example: Consider r(A. BITS.B ) with the following instance of r. Pilani . A p B does NOT hold. Navneet Goyal. whenever any two tuples t1 and t2 of r agree on the attributes E. 1 4 1 5 3 7 On this instance.Functional Dependencies Let R be a relation schema E R and F R The functional dependency EpF holds on R if and only if for any legal relations r(R). © Prof.

Functional Dependencies A B t A¶s B¶s u If t & u Then agree they must here agree here © Prof. Navneet Goyal. BITS. Pilani .

BITS. loan_number. Consider the schema: bor_loan = (customer_id. and for no E K.Functional Dependencies K is a superkey for relation schema R if and only if K p R K is a candidate key for R if and only if K p R. amount ) We expect this functional dependency to hold: loan_number p amount but would not expect the following to hold: amount p customer_name © Prof. E p R Functional dependencies allow us to express constraints that cannot be expressed using superkeys. Navneet Goyal. Pilani .

loan_number p customer_name customer_name p customer_name In general.Functional Dependencies A functional dependency is trivial if it is satisfied by all instances of a relation Example: customer_name. E p F is trivial if F E © Prof. BITS. Pilani . Navneet Goyal.

Tax_rate) Prop# is unique throughout India Plot# are unique within a given state For a given_state. Pilani . area. BITS. plot#. Navneet Goyal.Functional Dependencies Consider the relation: Information about plots available in India. state. price. irrespective of the state in which they are located Write all the FDs on the relation PLOTS © Prof. The constraints on the relation are: PLOTS (prop#. tax_rate is fixed Plots having the same area have the same price.

Navneet Goyal. BITS.Functional Dependencies PLOTS Prop# FD1 FD2 FD3 FD4 State Plot# Area Price Tax_rate PK CK Identify redundancy in PLOTS Identify update anomalies in PLOTS © Prof. Pilani .

Pilani . BITS.Functional Dependencies PLOTS Prop# FD1 FD2 State Plot# Area PK CK State FD3 Tax_rate FD4 Area Price © Prof. Navneet Goyal.

Navneet Goyal. Pilani . BITS.Normal Forms Normal Forms based on PK 2 NF 3 NF Boyce-Codd Normal Form (BCNF) 4 NF (Multivalued Dependencies) 5 NF (Join Dependencies) Deal with very rare practical situations Normal Forms based on CKs Other Normal Forms © Prof.

but no proper subset of A determines B No partial dependencies on the PK Is PLOTS in 2NF? YES Single attribute PK All relations with single attribute PK are in 2 NF!! 2 NF applies to relations with composite keys © Prof.2 NF Based on the concept of Full FDs (FFD) If A & B are sets of attributes of R. BITS. Pilani . Navneet Goyal. B is said to be FFD on A if A B.

BITS. Navneet Goyal. is said to be in 2 NF 1 NF Remove all Partial Dependencies 2 NF © Prof. Pilani .2 NF A relation that is in 1NF & every non-PK attribute is fully functionally dependent on the PK.

3 NF Based on the concept of transitive dependency No non-PK attribute should be transitively dependent on the PK Transitive Dependency If A B & B C. provided B & C do not determine A Is PLOTS in 3NF? NO © Prof. Pilani . BITS. Navneet Goyal. then A transitively determines C through B.

3 NF PLOTS Prop# FD1 FD2 FD3 FD4 State Plot# Area Price Tax_rate PK CK Prop# transitively determines tax_rate through state Prop# transitively determines price through area © Prof. Navneet Goyal. BITS. Pilani .

Navneet Goyal. BITS. is said to be in 3 NF 2 NF Remove all Transitive Dependencies 3 NF © Prof.3 NF A relation that is in 1NF & 2 NF & no non-PK attribute is transitively dependent on the PK. Pilani .

Navneet Goyal.BCNF Based on FDs that take into account all candidate keys of a relation For a relation with only 1 CK. 3NF & BCNF are equivalent A relation is said to be in BCNF if every determinant is a CK Is PLOTS in BCNF? NO © Prof. BITS. Pilani .

B. Navneet Goyal.Problem 1 Consider the relation R(A. BITS. Pilani . Is R in 2NF? Is R in 3NF? Is R in BCNF? © Prof.C) with functional dependencies ABpC and CpB.

Problem 2 For the relation R (A. Find the candidate keys of R List transitive dependencies in R (assume any CK as PK) Find the highest current normal form of R © Prof.D).C. Navneet Goyal. BITS. & BpA. Pilani .B. the Functional Dependencies are ApB. ApC. ApD.

B. R=(A. it may be possible that several other FDs must also hold for R For Example. Navneet Goyal. BITS.C) & FDs. there can be only one corresponding value for C The closure of F is the set of all FDs that can be inferred from F. & for that value of B. then FD A C also holds on R For a given value of A. Pilani . & is denoted by F+ © Prof. there can be only one corresponding value of B.Closure of a set of FDs Given a set of FDs F on a relation R. A B & B C hold in R.

& T follows from S © Prof. BITS. are equivalent if the set of relation instances satisfying S is exactly the same as the set of relation instances satisfying T S follows from T if every relation instance that satisfies T also satisfies all FDs in S S & T are equivalent iff S follows from T. Navneet Goyal. Pilani .Equivalent Set of FDs Two sets of FDs. S & T.

Pilani . Non-trivial & Completely Non-trivial FDs A B Trivial If B¶s are a subset of the A¶s Non-trivial If atleast one of the B¶s is not among A¶s Completely Non-trivial If none of the B¶s is also one of the A¶s © Prof. BITS.Trivial. Navneet Goyal.

Pilani . Navneet Goyal. BITS.Trivial Dependency Rule The FD A1A2A3«An B1B2B3«Bm is equivalent to A1A2A3«An C1C2C3«Ck where the C¶s are all those B¶s that are not A¶s © Prof.

s Axioms © Prof. more FDs can be inferred Such FDs are said to be logically implied by F F+ is the set of all FDs logically implied by F We can compute F+using formal defn. this process would be lengthy & cumbersome Axioms or Rules of Inference provide simpler technique Armstrong. of FD If F were large. Navneet Goyal.Closure of a set of FDs It is not suff. BITS. to consider just the given set of FDs We need to consider all FDs that hold Given F. Pilani .

Inference Rules for FDs Armstrong's inference rules: IR1. (Augmentation) If X Y. IR2. then XZ YZ (Notation: XZ stands for X U Z) IR3. IR3 form a sound & complete set of inference rules Never generates Generate all FDs any wrong FD that hold © Prof. then X Z IR1. then X Y IR2. BITS. Navneet Goyal. (Reflexive) If Y X. (Transitive) If X Y and Y Z. Pilani .

and IR3 (completeness property) Prove all the six rules (IR1 ± IR6) ± Use defn.then WX Z Above three inference rules. Pilani . BITS. as well as any other inference rules. then X YZ IR6: Psuedotransitivity: If X Y & WY Z. then X Y & X Z IR5: Union: If X Y & X Z. of FD & either by direct proof or proof by contradiction © Prof.Inference Rules for FDs Some additional inference rules that are useful: IR4: Decomposition: If X YZ. IR2. can be deduced from IR1. Navneet Goyal.

**Inference Rules for FDs
**

IR1. (Reflexive) If Y X, then X Y Proof: Y X & t1 & t2 some instance r of R t1[X]=t2[X], then t1[Y]=t2[Y] because Y X. IR2. (Augmentation) If X Y, then XZ YZ Proof by contradiction: Assume X Y holds but XZ YZ does not. Then there must exist 2 tuples t1 & t2 1. t1[X]=t2[X], 2. t1[Y]=t2[Y] 3. t1[XZ]=t2[XZ] & 4. t1[YZ]t2[YZ] Not possible because from 1 & 3 we deduce 5. t1[Z]=t2[Z], & from 2 & 5 we deuce 6. t1[YZ]=t2[YZ], contradicting 4

© Prof. Navneet Goyal, BITS, Pilani

Example

R = (A, B, C, G, H, I) F={ ApB ApC CG p H CG p I B p H} some members of F+

ApH

by transitivity from A p B and B p H

AG p I

by augmenting A p C with G, to get AG p CG and then transitivity with CG p I

CG p HI

By union rule © Prof. Navneet Goyal, BITS, Pilani

Procedure for Computing F+

To compute the closure of a set of functional dependencies F: F+=F repeat for each functional dependency f in F+ apply reflexivity and augmentation rules on f add the resulting functional dependencies to F + for each pair of functional dependencies f1and f2 in F + if f1 and f2 can be combined using transitivity then add the resulting functional dependency to F + until F + does not change any further

**NOTE: We shall see an alternative procedure for this task later
**

© Prof. Navneet Goyal, BITS, Pilani

Pilani . for computing closure: compute F+ & take all FDs with X on the LHS & take union of the RHS of all such FDs X+ can be calculated by repeatedly applying IR1. IR3 using the FDs in F Both these approaches become cumbersome if F is large & consequently F+ is larger © Prof. IR2. BITS.Closure of Attribute Sets Set of attributes functionally determined by X Closure of a set of attributes X with respect to F is the set X+ of all attributes that are functionally determined by X Algo. Navneet Goyal.

Closure of Attribute Sets Given a set of attributes E define the closure of E under F (denoted by E+) as the set of attributes that are functionally determined by E under F Algorithm to compute E+. while (changes to result) do for each F p K in F do begin if F result then result := result K end Try to find out why this algorithm works! Complexity of this algorithm Can you do any better? © Prof. the closure of E under F result := E. Pilani . Navneet Goyal. BITS.

result = = = = AG ABCG (A p C and A p B) ABCGH (CG p H and CG AGBC) ABCGHI (CG p I and CG AGBCH) Is AG a candidate key? 1. Pilani . G. Does A p R? == Is (A)+ R 2. CG p H. B p H} (AG)+ 1. I) F = {A p B. Is AG a super key? 1. Does AG p R? == Is (AG)+ R 2. C. H. A p C. result 3.Example of Attribute Set Closure R = (A. result 2. result 4. B. CG p I. Is any subset of AG a superkey? 1. BITS. Navneet Goyal. Does G p R? == Is (G)+ R © Prof.

© Prof. To check if a functional dependency E p F holds (or. and then check if it contains F. and for each S K+. we find the closure K+. Is a simple and cheap test.Uses of Attribute Closure There are several uses of the attribute closure algorithm: Testing for superkey: To test if E is a superkey. and check if E+ contains all attributes of R. Pilani Testing functional dependencies Computing closure of F . in other words. we output a functional dependency K p S. Navneet Goyal. we compute E+. just check if F E+. is in F+). That is. we compute E+ by using attribute closure. BITS. and very useful For each K R.

Pilani . a canonical cover of F is a ³minimal´ set of functional dependencies equivalent to F. A p CD} can be simplified B p C.Canonical Cover Sets of functional dependencies may have redundant dependencies that can be inferred from the others For example: A p C is redundant in: {A p B. A p D} B p C. Navneet Goyal. {A p B. B p C. BITS. A p D} Intuitively.: on RHS: to E.g. AC p D} can be simplified B p C. {A p B. having no redundant dependencies or redundant parts of dependencies © Prof. B p C} Parts of a functional dependency may be redundant E. {A p B.: on LHS: to {A p B.g.

Navneet Goyal.every FD in G can be inferred from F Hence.every FD in F can be inferred from G.Equivalence of Sets of FDs Two sets of FDs F and G are equivalent if: .e. F and G are equivalent if F+=G+ Definition: F covers G if every FD in G can be inferred from F (i. Pilani . BITS. if G+F+) F and G are equivalent if F covers G and G covers F There is an algorithm for checking equivalence of sets of FDs © Prof. & ..

AB p C} logically implies A p C (I. since a ³stronger´ functional dependency always implies a weaker one Example: Given F = {A p C. Attribute A is extraneous in E if A E and F logically implies (F ± {E p F}) {(E ± A) p F}. BITS. Attribute A is extraneous in F if A F and the set of functional dependencies (F ± {E p F}) {E p(F ± A)} logically implies F. the result of dropping B from AB p C).Extraneous Attributes Consider a set F of functional dependencies and the functional dependency E p F in F. AB p C } B is extraneous in AB p C because {A p C. Pilani Example: Given F = {A p C. Note: implication in the opposite direction is trivial in each of the cases above.e. AB p CD} . C is extraneous in AB p CD since AB p C can be inferred even after deleting C © Prof. Navneet Goyal.

Navneet Goyal. A is extraneous To test if attribute A F is extraneous in F 1. if it does. 2. © Prof. compute ({E} ± A)+ using the dependencies in F check that ({E} ± A)+ contains A. A is extraneous compute E+ using only the dependencies in F¶ = (F ± {E p F}) {E p(F ± A)}.Testing if an Attribute is Extraneous Consider a set F of functional dependencies and the functional dependency E p F in F. 2. Pilani . check that E+ contains A. To test if attribute A E is extraneous in E 1. if it does. BITS.

so it has to be reapplied © Prof.Canonical Cover A canonical cover for F is a set of dependencies Fc such that F logically implies all dependencies in Fc. Navneet Goyal. and Each left side of functional dependency in Fc is unique. To compute a canonical cover for F: repeat Use the union rule to replace any dependencies in F E1 p F1 and E1 p F2 with E1 p F1 F2 Find a functional dependency E p F with an extraneous attribute either in E or in F If an extraneous attribute is found. BITS. delete it from E p F until F does not change Note: Union rule may become applicable after some extraneous attributes have been deleted. Pilani . and Fc logically implies all dependencies in F. and No functional dependency in Fc contains an extraneous attribute.

BITS. B p C.Computing Canonical Cover R = (A. AB p C} Combine A p BC and A p B into A p BC Set is now {A p BC. Can use attribute closure of A in more complex cases C is extraneous in A p BC The canonical cover is: A p B. C) F = {A p BC. B p C} Check if A p C is logically implied by A p B and the other dependencies Yes: using transitivity on A p B and B p C. B p C is already present! A is extraneous in AB p C Set is now {A p BC. AB p C} Check if the result of deleting A from AB p C is implied by the other dependencies Yes: in fact. A p B. Navneet Goyal. B p C. B. B p C © Prof. Pilani .

g.Problems with Decompositions There are three potential problems to consider: Some queries become more expensive e. not in the PLOTS example How we could say this? Tradeoff: Must consider these issues vs. What is the price of prop# 1? Given instances of the decomposed relations. Navneet Goyal. we may not be able to reconstruct the corresponding instance of the original relation! Fortunately. redundancy © Prof.. not in the PLOTS example How we could say this? Checking some dependencies may require joining the instances of the decomposed relations. Fortunately. BITS. Pilani .

Pilani . BITS.Lossy Decomposition A 1 4 7 A 1 4 7 1 7 B 2 5 2 B 2 5 2 2 2 C 3 6 8 C 3 6 8 8 3 A 1 4 7 B 2 5 2 JOIN B 2 5 2 C 3 6 8 Note that we can never get anythng less than the original relation Spurious Tuples Since we don¶t know which tuples are spurious and which are genuine. Navneet Goyal. we have indeed lost information © Prof.

Lossy Decomposition S# S3 S5 Status City 30 30 Paris Athens S# S3 S5 Status 30 30 City Paris Athens City Paris Athens 1 S# S3 S5 Status 30 30 Status 30 30 2 S# S3 S5 © Prof. Pilani . BITS. Navneet Goyal.

C} be a relation.B} & {A. BITS. where A. & C are sets of attributes.Lossless Decomposition Observe that S satisfies the FDs: S# Status & S# City It can not be a coincidence that S is equal to the join of its projections on {S#. City} Heaths¶ Theorem: Let R{A. B. Status} & {S#.B. Pilani . then R is equal to the join of its projections on {A. Navneet Goyal. S# City is lost © Prof. If R satisfies A B & A C.C} Observe that in 2 the FD.

Pilani . BITS. Navneet Goyal. knowing that the instance of R can be recovered from the instances of R1 & R2 We can use FDs to show that decompositions are lossless © Prof. R2.Lossless Decomposition The decomposition of R into R1. «Rn is lossless if for any instance r of R r = R1 (r ) R2 (r ) «« Rn (r ) We can replace R by R1 & R2.

BITS. R1 R2 forms a superkey of either R1 or R2 © Prof. Pilani .Lossless Decomposition Theorem A decomposition of R into R1 and R2 is lossless join wrt FDs F. if and only if at least one of the following dependencies is in F+: R1 R2 p R1 R1 R2 p R2 In other words. Navneet Goyal.

A decomposition is dependency preserving. BITS. Pilani . then checking updates for violation of functional dependencies may require computing joins. if (F1 F2 « Fn )+ = F + If it is not. Navneet Goyal. which is expensive.Dependency Preservation Let Fi be the set of dependencies in F + that include only attributes in Ri. © Prof.

We apply the test on all dependencies in F to check if a decomposition is dependency preserving This procedure takes polynomial time.Testing for Dependency Preservation To check if a dependency E p F is preserved in a decomposition of R into R1. Rn we apply the following test (with attribute closure done with respect to F) result = E while (changes to result) do for each Ri in the decomposition t = (result Ri)+ Ri result = result t If result contains all attributes in F. BITS. then the functional dependency E p F is preserved. R2. Navneet Goyal. «. instead of the exponential time required to compute F+ and (F1 F2 « Fn)+ © Prof. Pilani .

Pilani . BITS. B p C} Key = {A} R is not in BCNF Decomposition R1 = (A. C) R1 and R2 in BCNF Lossless-join decomposition Dependency preserving © Prof.Example R = (A. B. R2 = (B. C ) F = {A p B. B). Navneet Goyal.

´ ACM TODS2. No.4 NF BCNF removes any anomalies due to FDs Further research has led to the identification of another type of dependency called Multi-valued Dependency (MVD) Proposed by R Fagin* in 1977 MVDs can also cause data redundancy MVDs are a generalization of FDs * R Fagin: ³Multi-valued Dependencies & a new normal form for relational databases. Pilani . 1977) © Prof. BITS. Navneet Goyal. 3 (Sept.

repeating groups are not allowed © Prof.4 NF Consider the following relation HCTX: Course DBS Teacher N Goyal J P Misra J P Misra Texts Garcia Raghu Connolly Garcia ADBS In relational databases. Navneet Goyal. BITS. Pilani .

4 NF 1 NF Version CTX COURSE TEACHER TEXTS DBS DBS DBS DBS ADBS ADBS N GOYAL N GOYAL J P MISRA J P MISRA J P MISRA J P MISRA GARCIA RAGHU R GARCIA RAGHU R GARCIA CONNOLLY NO FDs in this relation © Prof. BITS. Pilani . Navneet Goyal.

Pilani .4 NF Highest Normal Form? BCNF? CTX COURSE TEACHER TEXTS DBS DBS DBS DBS ADBS ADBS N GOYAL N GOYAL J P MISRA J P MISRA J P MISRA J P MISRA GARCIA RAGHU R GARCIA RAGHU R GARCIA CONNOLLY © Prof. BITS. Navneet Goyal.

Navneet Goyal. BITS.4 NF Anomalies? CTX COURSE MANY!! TEACHER TEXTS DBS DBS DBS DBS ADBS ADBS N GOYAL N GOYAL J P MISRA J P MISRA J P MISRA J P MISRA GARCIA RAGHU R GARCIA RAGHU R GARCIA CONNOLLY © Prof. Pilani .

Pilani . Navneet Goyal.4 NF Anomalies New Teacher for DBS New Text for ADBS Teacher teaching DBS leaves © Prof. BITS.

Teachers and texts are completely independent of one another CTX has no FDs at all CTX is in BCNF Any all key relation must necessarily be in BCNF!! But still there is a need to normalize CTX © Prof. then (c. Pilani .4 NF Points to note: If (c.x2). (c. Navneet Goyal.t1.x1).x2) both appear.t2.x1) will also appear. BITS.t1.t2. (c.

Navneet Goyal. BITS.4 NF Decompose & TX CT COURSE DBS DBS ADBS CTX into CT TX TEACHER N GOYAL J P MISRA J P MISRA COURSE DBS DBS ADBS ADBS TEXT GARCIA RAGHU R GARCIA CONNOLLY © Prof. Pilani .

The set of values for B & C are independent of each other course course pp pp teacher text (course multi-determines teacher) (text multi-dependent on course) © Prof. there is a set of values of B & a set of values of C.4 NF Decompose CTX into CT & TX is not done on the basis of FDs (as there are no FDs) Decompose CTX into CT & TX is done on the basis of MVDs MVDs Represents a dependency between attributes of a relation. such that for every value of A. Pilani . Navneet Goyal. BITS.

4 NF Interpretation of course pp teacher Although a course does not have a single corresponding teacher. i. Navneet Goyal. the set of teachers t matching the pair (c. Pilani . the FD course teacher does not hold Still each course must have a µwell defined¶ set of teachers For a given course c and a given text x.x) depends on value of c alone It makes no difference which particular value of x we choose Interpret course pp text analogously © Prof. BITS.e.

4 NF Formal Definition Let R be a relation and A.C be subsets of attributes of R. in every possible legal value of R.C) pair depends only on the value of A and is independent of the C value. Pilani . the MVD A pp B hold iff the MVD A pp C also holds.C). MVDs always go together in pairs and we write them as A pp B | C course pp teacher | text © Prof. then we say that A pp B iff. BITS.B. Navneet Goyal.B. the set of B values matching a given (A. It can be easily shown that for R(A.

C) be a relation where A.B.4 NF Fagin Theorem Let R(A.B} and {A. then R is equal to the join of its projections on {A. Pilani . BITS.C} iff R satisfies the MVD A pp B | C © Prof.B.C and be subsets of attributes of R. Navneet Goyal.

BITS. Navneet Goyal. Pilani .4 NF An MVDs A pp B is trivial if (a) B A or (b) A U B = R A relation that is in BCNF & contains no non-trivial MVDs is said to be in 4NF CTX is not in 4NF because course is a non trivial MVD pp teacher © Prof.

Pilani . BITS. Navneet Goyal.Multi-Valued Dependencies Most common source of redundancy in BCNF schemas is to put 2 or more M:M relationships in a single relation © Prof.

we can find a tuple v that agrees 1. Pilani . BITS.An pp B1B2«Bm holds for a relation R if for each pair of tuples t & u that agree on As. With t & u on As With t on Bs With u on all attributes of R that are not among As & Bs © Prof. 3. 2.Formal Definition of MVD The MVD A1A2«. Navneet Goyal.

Navneet Goyal. BITS.MVD A pp B A¶s t v u B¶s Others © Prof. Pilani .

Problem Solving Consider a relation R (A. DpE. (b) Use the result of part (a) to find out whether ABpD is implied by F AB+={ABCDE} If D is in AB+. Navneet Goyal.F) with the following FDs: F = {ABpC. BITS.E. then AB D is implied by F © Prof.C. BCpAD.B. CFpB} (a) Find out whether AB is a key of R or not.D. Pilani .

Q&A .

Thank You .

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd