Questions on Super keys –
Question 1 :
Relational schema R with n attribute A1, A2,…,A_{n}. How many super keys are possible with
a) only candidate keys A1
b) only Candidate Keys A1, A2
c) only Candidate keys (A1A2), (A3A4)
d) only candidate keys (A1A2), (A2,A3)
e) only candidate keys A1,A2,A3 ∩∪⇒
Solution :
a) only Candidate Keys A1
A1
A1A2
A1A3
A1A2A3
A1A2A3…..A_{n
}Common Attributes  {A2,A3,....An} = 2n1
So, Total Number of combinations of attributes that contains {A1} ⇒ 1 * 2^{{n1} }= 2^{{n1}}
b) only candidate keys A1,A2
(Table 1)
Super Keys possible with only candidate key A1 
A1
A1A2
A1A3
A1A2A3
A1A2A3……A_{n} 
⇒ 2^{n1} 

(Table 2)
Super Keys possible with only candidate key A2 
A2
A2A1
A2A3
A2A1A3
A2A1A3……A_{n} 
⇒ 2^{n1} 

Common Super Keys From Table 1 and Table 2 ⇒ {A3A4….A_{n}} = 2^{n2 }
So, Total Number of combinations of attributes that contains {A1}, {A2} or {A1,A2} ⇒ 3 * 2^{(n2}
}
3 * 2^{(n1) }can be written as ^{
}= (2+1) * 2^{(n1)}
= 2.2^{(n1)} + 1.2^{(n1)}
= 2^{(n2)} + 2^{(n1)} 

So, From the above observation, if there are n attributes and m candidate keys, then the possible superkeys with m candidate keys will be 
2^{n1} + 2^{n2} + 2^{n3} + ………… + 2^{nm}
Another Solution with the help of Venn Diagram :
c) only candidate keys (A1,A2), (A3,A4)
d) Only Candidate keys (A1A2),(A2A3)
e) only candidate keys A1,A2,A3
Question 2 :
Relational scheme R with N attribute A_{1}A_{2}….A_{n}. If every attribute is the Candidate Key, then how many superkeys are possible? {DRDO}
Solution :
Let R(ABC), so
A
B
C
AB
BC
AC
ABC =7 =2^{3}1
It implies, 2^{n}1 Super Keys. Why 2^{n}1? because
Total Number of Subsets possible with n elements = 2^{n}
But It includes Ø, However in case of SuperKey atleast 1 key is mandatory. As every attribute is candidate key, So,
2^{n}1
Question 3:
Consider a Relational Schema R with attributes A,B,C,D,E.
How many super keys are possible if
{A,B,C} : Candidate Keys
Solution :
3 Candidate Keys out of 5 attributes  resembling the state as m candidate keys out of n attributes. So, By applying the above formula, we get the following results 
A 
B 
C 
2^{51}=16 
2^{52}=8 
2^{53}=4 

=16+8+4=28
Verification :
A 
B 
C 
AB
AC
AD
AE 
BC
BD
BE
BA 
CD
CE
CA
CB 
ABC
ABD
ABE
ACD
ACE
ADE 
BCD
BCE
BDE
ABC
ABD
ABE 
CDE
ABC
ACD
ACE
BCE
BDE 
ABCD
ABCE
ABDE
ACDE 
BCDE
ABCD
ABCE
ABDE 
ABCD
ABCE
ACDE
BCDE 
ABCDE 
ABCDE 
ABCDE 
16 
8 
4 

The candidate keys which are in red colour, are duplicate. So, excluding those in the answer.
Question 4 :
How many Superkeys are possible with only candidate keys A1,A2,A3,A4 if there are n attributes in a Relational Schema R? Explain the solution with the help of Venn Diagram.
Solution :
Incoming search terms:
 how find total super candidate key un dbms formula
 if reation R(A1 A2An)then ifAis candidate key and find toal key
 how many super key in ralatuon with some attribute
 no of super keys and candidate keys
 total number of super keys in a table
 superkey edugrab com
 relational schema with n attributes then how many super key possible
 relational schema with n attributes how many super keys possible
 r (a1 a2 an) candidate key (a1 a2)
 number of super keys when evry attributes of r forms candidate key
Related
WAW!!!THIS SITE IS AMANDATORY SITES.PLEACES!SHARE THIS OUDIOUNS IN ANY SOCIAL MEADIES.10Q!MORE AND MORE.
Please help us in doing that.we will be very happy