883 views
1 votes
1 votes

1 Answer

Best answer
4 votes
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

Related questions

3 votes
3 votes
2 answers
1
Anmol Verma asked Nov 23, 2016
1,594 views
how to find the no. of sk......give some conceptual thought on this....???
0 votes
0 votes
0 answers
3
Dhoomketu asked Apr 8, 2018
368 views
How to calculate super key of any relation?Pls explain with example.
2 votes
2 votes
2 answers
4
rahul sharma 5 asked Jul 11, 2017
639 views
R(ABCDEF) with candidate keys set { A,BC,CD}. Find number of superkeys?