functional dependencies – Partial Dependency (Databases)

functional dependencies – Partial Dependency (Databases)

A FD (functional dependency) that holds in a relation is partial when removing one of the determining attributes gives a FD that holds in the relation. A FD that isnt partial is full.

Eg: Suppose {A,B} → {C} but also {A} → {C}. Then {A,B} → {C} is partial; {C} is partially functionally dependent on {A,B}; {C} is functionally dependent on a part of {A,B} that is not all of it. The consequent partial FD is not {A} → {C}. Whether that is partial depends on (per the definition of partial FD) whether a subset of {A} determines {C}; whether {} → {C}.

Eg: Heres a relation value where that example condition holds. (A FD holds in a relation variable when it holds in every value that can arise.)

A  B  C
1  1  1
1  2  1
2  1  1

The non-trivial FDs that hold: {A,B} determines {C}, {B,C}, {A,C} & {A,B,C}; {A}, {B} & {} also determine {C}. Of those: {A,B} → {C} is partial per {A} → {C}, {B} → {C} & {} → {C}; {A} → {C} & {B} → {C} are partial per {} → {C}; the others are full.

A functional dependency X → Y is a full functional dependency if removal of any attribute A from X means that the dependency does not hold any more; that is, for any attribute A ε X, (X – {A}) does not functionally determine Y. A functional dependency X → Y is a partial dependency if some attribute A ε X can be removed from X and the dependency still holds; that is, for some A ε X, (X – {A}) → Y.

— Fundamentals OF Database Systems 6th Edition, Ramez Elmasri & Navathe

Notice that whether a FD is full vs partial doesnt depend on CKs (candidate keys), let alone one CK that you might be calling the PK (primary key).

(A definition of 2NF is that every non-CK attribute is fully functionally determined by every CK. Observe that the only CK is {A,B} & the only non-CK attribute C is partially dependent on it so this value is not in 2NF & indeed it is the lossless join of components/projections onto {A,B} & {A,C}, onto {A,B} & {B,C} & onto {A,B} & {C}.)

(Beware that that textbooks definition of transitive FD does not define the same sort of thing as the standard definition of transitive FD.)

Partial dependency means that a nonprime attribute is functionally dependent on part of a candidate key. (A nonprime attribute is an attribute thats not part of any candidate key.)

For example, lets start with R{ABCD}, and the functional dependencies AB->CD and A->C.

The only candidate key for R is AB. C and D are a nonprime attributes. C is functionally dependent on A. A is part of a candidate key. Thats a partial dependency.

functional dependencies – Partial Dependency (Databases)

Partial dependency implies is a situation where a non-prime attribute(An attribute that does not form part of the determinant(Primary key/Candidate key)) is functionally dependent to a portion/part of a primary key/Candidate key.

Leave a Reply

Your email address will not be published. Required fields are marked *