1,379 views
1 1 vote

1 Answer

Best answer
4 4 votes

Here simple candidate keys mean candidate keys having only one attribute.

So for m simple candidate keys, we will have 2m - 1  super keys(as each candidate key will either be included or not, so 2 choices for each simple candidate key and -1 when neither of candidate keys is selected)

Now, we're left with (n - m) (given that $m\leq n$) attributes and we know that superset of super keys is also a super key. So, we either include them or don't include them. So, (n - m) elements have 2 choices each.

So, total super keys possible = (2m - 1) * 2n - m

Let's verify with an example. A relation R(A, B, C) with candidate keys as A and B.

So here, m = 2

Super keys possible with m candidate keys should be 2m - 1 = 3 which are {A, B, AB}

And now we're left with n - m = 3 - 2 = 1 element i.e. C which may be included or not to form super keys.

So total super keys possible = 3 * 21 = 6 {A, AB, AC, ABC, B, BC}

P.S : Such questions can also be solved using Venn Diagrams.

selected by
Position:
Show:

Related questions

3 3 votes
2 answers 2 answers
2.3k
2.3k views
Anmol Verma asked Nov 23, 2016
2,253 views
how to find the no. of sk......give some conceptual thought on this....???
2 2 votes
1 answers 1 answer
3.8k
3.8k views
Mojo-Jojo asked Jan 14, 2016
3,751 views
Q3). Consider the Relation $R(A,B,C,D,E)$ and $F.D's$ are $AB\rightarrow CD,CD\rightarrow E,E\rightarrow AB$ then the total number of super key are:-(A). $10$(B). $12$(C)...
3 3 votes
1 1 answer
143
143 views
GO Classes asked Sep 2
143 views
A relation schema $R$ has $6$ attributes.Assume that the empty set is not considered a key.What is the maximum possible number of superkeys of $R$?
0 0 votes
0 0 answers
731
731 views
Dhoomketu asked Apr 8, 2018
731 views
How to calculate super key of any relation?Pls explain with example.