edited by
3,442 views
2 votes
2 votes

Relation R(A1, A2, A3 ..... An) n attributes. On this relation m simple candidate key (m ≤ n). How many super keys possible in this relation?

A. 2m – 1

B. (2n – 1) ⋅ 2n-m

C. 2n – 1

D. (2m – 1) 2n-m

One way is by taking instances and solve it, but plz without it what's the logic behind the answer?

edited by

1 Answer

7 votes
7 votes
Since all the Candidate keys here are Simple (Single attribute), We can do it by Complement method.

For a Group of attributes to be called a Super key, It must contain at least One Candidate key. Thus, Some Group of attributes can never be a Super key if it does not contain any candidate key. There are $n-m$ Non-prime attributes. If we make any subset from these $n-m$ attributes, that can never be a Super key. Else if we include at least One of the $m$ attributes, that would be called Super key. So..

Number of Super Keys possible = All Possible Subsets of $n$ attributes -  All Possible subsets of $n-m$ attributes.

$2^n - 2^{n-m}$

Related questions

0 votes
0 votes
1 answer
1
3 votes
3 votes
2 answers
2
Ram Swaroop asked Jan 30, 2019
1,298 views
Consider the following relation R(A1, A2,...A15) with (A1,A2, ... A6) of relation R are simple candidate key. The number of possible superkey in relation R is_
0 votes
0 votes
1 answer
3
Na462 asked Oct 13, 2018
828 views
How many Super keys Possible for R(A,B,C,D,E) with1. {A,BC,DE} as the keys ?2. {A,BC,CDE} as the keys ?