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?

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top