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 :)

+3 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.3k
- Engineering Mathematics 5.4k
- Digital Logic 2.1k
- Programming & DS 3.9k
- Algorithms 3.4k
- Theory of Computation 4.2k
- Compiler Design 1.6k
- Databases 3.1k
- CO & Architecture 2.7k
- Computer Networks 3.1k
- Non GATE 1.1k
- Others 1.4k
- Admissions 501
- Exam Queries 449
- Tier 1 Placement Questions 19
- Job Queries 62
- Projects 12

37,996 questions

45,492 answers

131,517 comments

48,590 users