7

What are the non-trivial functional dependencies in the following table?

A             B               C
1             1               1
1             1               0
2             3               2
2             3               2

What the basic concept?

philipxy
  • 14,867
  • 6
  • 39
  • 83
vashu
  • 105
  • 1
  • 2
  • 5

6 Answers6

12

A functional dependency answers the question, "Given one value for X, do I find one and only one value for Y?" Both X and Y are sets; each one represents one or more attributes.

So we can ask ourselves, "Given one value for 'A', do I find one and only one value for 'B'?" And the answer is "Yes". (Assuming the sample data is representative.) That leads to the nontrivial functional dependency A->B.

And we continue with the question, "Given one value for 'A', do I find one and only one value for 'C'?" And the answer is "No". Given 1 for 'A', we find two different values for 'C': 1 and 0. No functional dependency there.

Repeat for every possible combination of attributes.

Mike Sherrill 'Cat Recall'
  • 91,602
  • 17
  • 122
  • 185
  • here we are considering. subset. eg A ={1,2} and C = {0,1,2}. Now C. is not a subset of A. so. A->C. so there is. No FD. but. A is subset Of C. so. C->A exist in trivial FD. is it right – vashu Apr 10 '14 at 17:19
  • 1
    C->A holds; C->A is a functional dependency. Functional dependencies have nothing to do with subsets in the sense you seem to be using that word. – Mike Sherrill 'Cat Recall' Apr 10 '14 at 17:29
11

Trivial: If an FD X → Y holds where Y subset of X, then it is called a trivial FD. Trivial FDs are always hold.

Non-trivial: If an FD X → Y holds where Y is not subset of X, then it is called non-trivial FD.

Completely non-trivial: If an FD X → Y holds where x intersect Y = Φ, is said to be completely non-trivial FD.

For example:

X = { b, c } and Y = { b, a }. If X → Y, then the FD is non-trivial but not completely non-trivial.

Mohammed H
  • 6,880
  • 16
  • 81
  • 127
user4280884
  • 111
  • 1
  • 2
  • 2
    This is an example to complement this correct answer: for A = { Y, Z } and B = { Y, X }, and if A->B, then we have that A->B is non-trivial and that A->B is *not* completely-non trivial. – KGs Apr 16 '17 at 10:56
0

See the examples here: http://en.wikipedia.org/wiki/Functional_dependency

Especially the lecture one. I think in this case (for the data set you show) for instance if A=1 B=2 and if A=2 B=3. That is probably the dependency you are talking about.

kayakpim
  • 985
  • 2
  • 8
  • 28
0

non trivial dependency means X-->Y that is if Y is not proper subset of X table or relation with X then it said to be non trivial functional dependency.

0

A FD (functional dependency) is trival, non-trivial or semitrivial.

Write what all attributes have functional dependency between them:

A->B, B->A, C->A, C->B

Using the augmentation inference rule we also get:

AC->B, BC->A

Augmentation says that if A -> B holds then AX -> BX holds.

So in total we have 5 non-trivial functional dependencies.

philipxy
  • 14,867
  • 6
  • 39
  • 83
  • You don't justify which FDs don't hold. You just find some that do hold. Also, "write what all attributes have functional dependency between them" is unclear. Also, after you find them, finding some of the FDs implied by them is not a way to find all the FDs implied by them or all the non-trivial FDs implied by them. The reasoning here is not clear & not sound. PS "semitrivial" is not a correct term. Whatever you are trying to say by it, how is that relevant? – philipxy Feb 08 '23 at 08:21
-1

Trivial fd: x,y some attributes sets, if y is a subset of x then x->y implies is a trivial fd.

Non-trivial fd; x,y some attributes sets , if x intersection y goes to phi. then x->