Consider the relation scheme R = {E, F, G, H, I, J, K, L, M, M} and the set of functional dependencies {{E, F} -> {G}, {F} -> {I, J}, {E, H} -> {K, L}, K -> {M}, L -> {N} on R. What is the key for R?

**(A)** {E, F}

**(B)** {E, F, H}

**(C)** {E, F, H, K, L}

**(D)** {E}

**Answer:** **(B)** **Explanation:** All attributes can be derived from {E, F, H}

To solve these kind of questions that are frequently asked in GATE paper, try to solve it by using shortcuts so that enough amount of time can be saved.

**Fist Method:**

Using the given options try to obtain closure of each options. The solution is the one that contains R and also minimal Super Key, i.e Candidate Key.

A) {EF}+ = {EFGIJ} ≠ R(The given relation) B) {EFH}+ = {EFGHIJKLMN} = R (Correct since each member of the given relation is determined) C) {EFHKL}+ = {EFGHIJKLMN} = R (Not correct although each member of the given relation can be determined but it is not minimal, since by the definition of Candidate key it should be minimal Super Key) D) {E}+ = {E} ≠ R

**Second Method:**

Since, {EFGHIJKLMN}+ = {EFGHIJKLMN} {EFGHIJKLM}+ = {EFGHIJKLMN} ( Since L -> {N}, hence can replace N by L) In a similar way K -> {M} hence replace M by K {EFGHIJKL}+ = {EFGHIJKLMN} Again {EFGHIJ}+ = {EFGHIJKLMN} (Since {E, H} -> {K, L}, hence replace KL by EH) {EFGH}+ = {EFGHIJKLMN} (Since {F} -> {I, J} ) {EFH}+ = {EFGHIJKLMN} (Since {E, F} -> {G} )

This explanation is contributed by **Manish Rai.**

Learn more here:

Finding Attribute Closure and Candidate Keys using Functional Dependencies

Quiz of this Question

## Recommended Posts:

- GATE | GATE CS 1999 | Question 36
- GATE | GATE CS Mock 2018 | Question 39
- GATE | GATE CS 2013 | Question 1
- GATE | GATE CS 2013 | Question 3
- GATE | GATE CS 2013 | Question 4
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 6
- GATE | GATE CS 2013 | Question 7
- GATE | GATE CS 2013 | Question 8
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 11
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 17
- GATE | GATE CS 2013 | Question 18
- GATE | GATE CS 2013 | Question 19
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 22
- GATE | GATE CS 2013 | Question 23