The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+16 votes
1.5k views
The maximum number of superkeys for the relation schema $R(E,F,G,H)$ with $E$ as the key is _____.
asked in Databases by Veteran (106k points) | 1.5k views
0
wht if EF is candidate key then what will be formula?
0
There is no need to cram any formula. The thing is if we take EF as the candidate key then any superset of other attributes(G, H) will also come under super key.with 2 attributes total 4 possibilities are there.First is either both of them should be present, or one of them is present or none of them should be present.

So total EF as candidate key, the total number of superkeys possible = 4 {EF, EFG, EFH, EFGH}

7 Answers

+33 votes
Best answer

Super Key is any set of attributes that uniquely determines a tuple in a relation.

Since $E$ is the only key, $E$ should be present in any super key.

Excluding $E$, there are three attributes in the relation, namely $F, G , H$. Hence, if we add $E$ to any subset of those three attributes, then the resulting set is a super key. Number of subsets of $\{F, G, H\}$ is $8$. Hence the answer is $8$.

The following are Super Keys: $$\left \{ \substack{E\\EF\\EG\\EH\\EFG\\EFH\\EGH\\EFGH} \right \}$$

answered by Boss (11.5k points)
selected by
0
please tell me how you find all the keys without functional dependencies ???
0
where does the statement say E is the only key?
+16 votes
total number of super keys = $E$ has to be included it is must $\times$ for each attribute we have $2$ choices include it or don't

$\text{Total number of Super keys } = 1 \times 2 \times 2 \times 2 = 8$
answered by Boss (30.8k points)
+6 votes

E is the key so E must be included for the rest 3 we can take 0 or 1 or 2 or 3 so 3C0+3C1+3C2+3C3=1+3+3+1=8

answered by Active (4.1k points)
+3 votes

Maximum no. of possible superkeys for a table with n attributes = 2^(n-1) Here, n = 4. So, the possible superkeys = 24-1 = 8 The possible superkeys are : E, EH, EG, EF, EGH, EFH, EFG, EFGH

answered by Loyal (8.6k points)
+3 votes

THE BEST METHOD FOR CALCULATING NO OF SK's:

total no of sk's= (# sk's over prime attributes) *  (2^#no of non-prime)

total no of sk's= 1*(2^3)

total no of sk's=8

answered by Active (4.5k points)
edited by
+1 vote
Given E is the key,So if we add any element  with E it will become super key. Now we have 3 element F,G,H. for each element we have 2 option either to include it or not to include it . So resulting no. of superkey is 2 * 2 * 2= 8
answered by (67 points)
–6 votes
15 super keys are possible with E as compulsory attrubite we can add any number of attrubuts from 3 of them.

If we add one of them = 3

If we add two of them = 3*2

If we add 3 of them = 3*2
answered by Active (3.3k points)
+1
How come 15?

The answer would be 8.
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

42,599 questions
48,601 answers
155,672 comments
63,739 users