1,795 views
0 votes
0 votes

Consider the following relation:

R (A1, A2, ….An) and every (n-2) attributes of R forms a candidate key. How many super
keys are there in R?

1 Answer

Best answer
3 votes
3 votes

As every n-2 attributes of relation R form a candidate key it implies that every n-1 attributes will also be a super key(because it contains the n-2 attributes that form a candidate key previously)

so total number of super keys:

as every candidate key is a super key :

 $\binom{n}{n-2}$ candidate keys will be there.

taking all possible combinations of 'n-1' attributes together they will also form a super key:

$\binom{n}{n-1}$ 

taking all possible combinations of 'n' attributes together :

$\binom{n}{n}$ (which will be the complete attribute set)

so final answer would be:

 

 $\binom{n}{n-2}$+$\binom{n}{n-1}$ +$\binom{n}{n}$=$\frac{n^{2}+n+2}{2}$

 

 

selected by

Related questions

0 votes
0 votes
1 answer
1
ssm asked Apr 18
65 views
R(A1, A2,A3,A4....AN). How many super keys possible in relation? If (A1 is candidate key, A2 is candidate key, A3 is candidate key)
0 votes
0 votes
6 answers
2
kaustubh7 asked Sep 20, 2023
876 views
Consider a relation $R(ABCDEFGH)$.How many superkeys will be there in relation $R$ if the candidate keys for relation are ${A, BC, CDE, EF}$?
2 votes
2 votes
1 answer
3
srestha asked May 9, 2019
1,860 views
Consider the relation $R\left ( A,B,C,D,E \right )$$A\rightarrow BC$$C\rightarrow E$$B\rightarrow D$$E\rightarrow A$Total number of superkeys present in relation will be ...
3 votes
3 votes
2 answers
4
Ram Swaroop asked Jan 30, 2019
1,308 views
Consider the following relation R(A1, A2,...A15) with (A1,A2, ... A6) of relation R are simple candidate key. The number of possible superkey in relation R is_