The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

0 votes

Here is para from wiki, about functional dependency in relation dbms

Given a relation R, a set of attributes X in R is said to functionally determine another set of attributes Y, also in R, (written X → Y) if, and only if, each X value is associated with precisely one Y value; R is then said to satisfy the functional dependency X → Y. Equivalently, the projection \pi_{X,Y}R is a function, i.e. Y is a function of X.[1][2] In simple words, if the values for the X attributes are known (say they are x), then the values for the Y attributes corresponding to x can be determined by looking them up in any tuple of R containing x. Customarily X is called the determinant set and Y the dependent set. A functional dependency FD: X → Y is called trivial if Y is a subset of X.

I could not get the last point "A functional dependency FD: X → Y is called trivial if Y is a subset of X."

please give me an example and explain it

Thank you :)

Given a relation R, a set of attributes X in R is said to functionally determine another set of attributes Y, also in R, (written X → Y) if, and only if, each X value is associated with precisely one Y value; R is then said to satisfy the functional dependency X → Y. Equivalently, the projection \pi_{X,Y}R is a function, i.e. Y is a function of X.[1][2] In simple words, if the values for the X attributes are known (say they are x), then the values for the Y attributes corresponding to x can be determined by looking them up in any tuple of R containing x. Customarily X is called the determinant set and Y the dependent set. A functional dependency FD: X → Y is called trivial if Y is a subset of X.

I could not get the last point "A functional dependency FD: X → Y is called trivial if Y is a subset of X."

please give me an example and explain it

Thank you :)

+4 votes

Best answer

The problem here is "trivial". A native English speaker wouldn't have any doubt in this. Here is one example usage of it:

(a) An engineering student having attended high school is trivial.

More details:

http://dictionary.reference.com/browse/trivial

Now, coming to FD, we say X → Y when Y is dependent on X. That is, whenever X value changes Y value should change accordingly. Now consider X= {A,B,C} and Y = {A}, where Y is a subset of X. Let us consider a tuple of relation R containing X and Y (second one in the below table where x represents any value)

A | B | C | D |

x | x | x | x |

first |
456 |
chennai |
- |

x | x | x | x |

Here, value of X for our tuple = {first, 456,chennai}, and value of Y = {first}. Now when "first" changes to say "second", it will change the value in both X as well as Y, as the attribute A is the same in both X and Y. So, there is no meaning in this FD as it is always there, and hence it becomes trivial.

- All categories
- General Aptitude 1.8k
- Engineering Mathematics 7.3k
- Digital Logic 2.9k
- Programming & DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6k
- Compiler Design 2k
- Databases 4.1k
- CO & Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.4k
- Others 1.4k
- Admissions 596
- Exam Queries 577
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

49,530 questions

54,139 answers

187,354 comments

71,068 users