B98
B98

Reputation: 1239

Do functional dependencies, if trivial, imply a subset relationship, given singleton domains?

Looking at definitions of FD. Where X and Y are subsets of a schema's attributes, I see both:

Another characterization of "trivial" mentions “cannot possibly fail to hold” (C.J. Date). If nontrivial is explicitly characterized, then as "not trivial" (“of course”).

Now imagine some attribute A having a domain of just one value. Say, A's type includes just the value 1. Then, if any relation R includes A, every set of attributes of R functionally determines A, i.e. X → A irrespective of whether {A} ⊆ X or not, because it cannot possibly not hold for any X ⊆ R. Reason:

given any subtuple whatever, its A-component is given, too, being invariably 1.

So, is the subset condition characterizing FDs as being trivial both necessary and sufficient, in view of such domains?

(These singleton domains, in turn, could be called trivial, too, I guess, but still the definitions made me wonder. Or confused. ;-)

Upvotes: 2

Views: 318

Answers (1)

Renzo
Renzo

Reputation: 27424

In a relation R you can have one or more attributes constant. If A is such an attribute, than in that relation the following, non-trivial, dependency holds:

∅ → A

Thinking to the definition of functional dependency, this means that for each couple of tuples in an instance of R, they coincide always on A. This dependency is obviously non-trivial, since the right-hand part is not a subset of the left-hand part.

Moreover, as a consequence of this dependency, we have that X → A, for each subset X of attributes of R. This can be easily derived from the Armstrong’s axioms, by applying the reflexivity and transitivity rules:

X → ∅  (for the reflexivity rule, since for each X, ∅ ⊆ X)
X → A  (by applying the transitivity rule to X → ∅ and ∅ → A)

Upvotes: 1

Related Questions