Non trivial functional dependency in DBMS
Asked Answered
G

6

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?

Gwendolyn answered 10/4, 2014 at 15:24 Comment(0)
C
13

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.

Chacha answered 10/4, 2014 at 15:56 Comment(2)
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 rightGwendolyn
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.Comedo
D
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.

Disaffirm answered 22/11, 2014 at 4:11 Comment(1)
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.Devour
C
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.

Calamint answered 10/4, 2014 at 15:59 Comment(0)
B
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.

Baumbaugh answered 25/4, 2015 at 11:47 Comment(0)
S
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.

Saccular answered 8/2, 2023 at 7:15 Comment(1)
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?Herpes
D
-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->

Dessert answered 13/1, 2015 at 20:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.