Redirected
1,614 views

2 Answers

Best answer
9 votes
9 votes

Here candidate keys are already given .So we need to use only set theory to find no of superkeys :

a) Candidate key one at a time :

(i) Due to AB : Now we can either add or not add each of attributes C,D and E to AB to form superkey as we know candidate key is a minimal superkey..So for each of the 3 attributes , we have 3 choices 

So no of superkeys due to AB  =  23  =  8

Similarly no of superkeys due to BC  =  8

Similarly no of superkeys due to CD  =  8

b) Candidate key 2 at a time :

(i) Due to AB,BC : We have 2 attributes remaining D and E..So no of ways  =  22  =  4

(ii) Due to BC,CD : We have 2 attributes remaining A and E..So no of ways  =  22  =  4

(iii) Due to AB,CD : We have only E remaining so no of ways  =  2

c) Candidate key taken all at a time :

i.e. due to AB,BC and CD : We have only E remaining so no of ways  =  2

Now having done this we apply inclusion exclusion principle :

No of superkeys  =  Superkeys due to candidate key one at a time 

                          -     Superkeys due to candidate key one at a time 

                          +    Superkeys due to candidate key one at a time 

                          =   24 - 10 + 2

                          =   16

Therefore no of superkeys = 16..Hope this clears your query..

selected by
1 votes
1 votes

every super set of candidate key is super key

AB
ABC
ABD
ABE
ABCD

ABDE
ABCE
ABCDE

BC
BCD
BCE
BCDE

CD
ACD
CDE

ACDE

Total 16

Related questions

2 votes
2 votes
2 answers
2
rahul sharma 5 asked Jul 11, 2017
650 views
R(ABCDEF) with candidate keys set { A,BC,CD}. Find number of superkeys?
1 votes
1 votes
1 answer
3
Arnabi asked Oct 26, 2017
902 views