0

Transitive functional dependency is defined as:

If A → B and B → C then A → C (Reference: This Tutorial!)

If an attribute is dependent on a composite of two attributes ( i.e. A,B -> C), then is this a functional dependency?

Can we consider this type of dependence to be (or not) a transitive dependency?

philipxy
  • 14,867
  • 6
  • 39
  • 83
Solace
  • 8,612
  • 22
  • 95
  • 183

2 Answers2

2

If an attribute is dependent on a composite of two attributes (A,B->C) then this is a "functional dependency".

A transitive dependency occurs when you have a non-key predicate that is placed in a "child" relation when it properly belongs in the "parent" relation. In your case, A->C is a transitive dependency.

There is a pretty clear practical example of a transitive dependency on Wikipedia.

It should be noted that there is a difference between A->B, B->C and A,B->C. These are not equivalent dependencies.

Joel Brown
  • 14,123
  • 4
  • 52
  • 64
  • 2
    To answer the OP's first question, yes, AB->C is a functional dependency. – Mike Sherrill 'Cat Recall' Apr 19 '14 at 20:58
  • Re 'a non-key predicate that is placed in a "child" relation when it properly belongs in the "parent"': What do you mean, "predicate"--"attribute"? Anyway, FDs and transitive FD chains are within one relation. Also, FD transitivity is independent of keys. (See your own reference.) PS Typo for "B->C". – philipxy Sep 13 '14 at 23:12
  • I notice that the last sentence of the linked wiki article mentions keys. It is wrong. The transitive dependency of the example holds no matter what the keys are. This is clear from the definition and the reasoning in the example. (The wiki has a lot of nonsense regarding relational normalization.) (In fact the link's claim that 3NF "excludes certain types of transitive dependencies" should be "requires certain types of non-transitive dependencies".) – philipxy Sep 14 '14 at 00:01
2

TL;DR A "dependency" written with "→" is a FD (functional dependency). A "transitive dependency" written with "→" is a transitive FD. That's what "dependency" means (is short for) for "→".


A FD has one set determining another. Either set can have any number of attributes. (If a set has just one attribute we also say that that attribute determines or is determined.)

Transitive functional dependency is defined as:
If A → B and B → C then A → C (Reference: This Tutorial!)

That is unclear & wrong. So is your reference. A → C transitively when there exists S where A → S & S → C & not (S → A). So if A → B & B → C & not (B → A) then A → C transitively, but if A → B & B → C but B → A then A → C is not transitive via B, although it might be transitive via some other attribute set.

If an attribute is dependent on a composite of two attributes ( i.e. A,B -> C), then is this a functional dependency?

That means "If an attribute is the dependent attribute of a FD whose determinant is a composite of two attributes ( i.e. {A,B} -> C), then is this a FD?" You assumed there was a FD, so there's a FD. The answer is (trivially) "yes".

Maybe you mean something else that you have not written clearly?

Maybe you mean, can a FD have a set of attributes as determinant? Yes.

Can we consider this type of dependence to be (or not) a transitive dependency?

Look at the definition. {A,B} → C transitively when there exists S where {A,B} → S & S → C & not (S → {A,B}). But no such S involving A, B and/or C exists. So just knowing you have a "composite" determinant tells you nothing about whether a FD is transitive. So no we cannot "consider it to be" transitive. It might or might not be transitive in a particular relation.

Maybe you mean, if A → C & B → C then does {A,B} → C? Yes. Adding a determinant attribute to a FD that holds gives another FD that holds. Since A and B each determine C, any set containing A or B determines C. Does {A,B} → C transitively? Again no such S involving A, B and/or C exists. So this has nothing to do with transitivity.

Maybe you mean, if A → B & B → C then does {A,B} → C? Yes. As above, adding a determinant attribute to a FD that holds gives another FD that holds. Since B determines C, any set containing B determines C. Does {A,B} → C transitively? The only S involving A, B and/or C would be {B}, if not (B → A). So we can't "consider" {A,B} → C to be transitive here either.

philipxy
  • 14,867
  • 6
  • 39
  • 83