• edited by
2,293 views
5 5 votes

Consider a relation $R$ with $2n$ attributes. Assume any $2n/2$ of the attributes constitutes key. Total number of super keys possible are:

  1. $^{2n}C_{2^{n-1}}\times \left(2\right)^{2^{n-1}}$
  2. $^{2n}C_{2^{n-1}} + \left(2\right)^{2^{n-1}}$
  3. $^{2n}C_{2^{n-1}} - \left(2\right)^{2^{n-1}}$
  4. $^{2n}C_{2^{n-1}} \div \left(2\right)^{2^{n-1}}$

2 Answers

4 4 votes
Well I think there is a typo in question ....

as per the given answer..:p

the question should be

There are 2^n attributes in a relation R,... Any combination (2^n)/2 (i.e 2^(n-1)) keys forms a candidate key then

number of candidate keys---> $\binom{2^{n}}{2^{n-1}}$

remaining attributes --> $2^{n}-2^{n-1}= 2^{n-1}$

any of the subset could be taken for a superkey

therefore number of subsets $2^{2^{n-1}}$

therefore total number of superkeys  $\binom{2^{n}}{2^{(n-1)}}*2^{2^{n-1}}$
0 0 votes
Candidate key:- it is the minimal super key which can identify each tuple uniquely. A table can have more than one candidate kr possible.

As it is minimal, any attribute attach to it will make it a super key.

So here out of 2n attributes we can have any 2n/2 attributes as candidate key.therefore can select the attributes in   2nC(2n/2) ways .

Attributes left - 2n/2

Now any attribute attach with any candidate keys will make them super key.

So for each attributes we can have 2 choices either  include them or leave them

So for 2n/n attributes total way to select: 2^2n/2

Total super key: 2nC(2n)/2 *2^2n/2
Position:
Show:

Related questions

3 3 votes
2 answers 2 answers
3.0k
3.0k views
srestha asked May 9, 2019
3,003 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 ...
4 4 votes
1 1 answer
1.1k
1.1k views
Akash Kanase asked Jan 15, 2016
1,149 views
I think here even with Ph is removed from table we still get 12 Super keys. Because Salary & One of CK must be there.
2 2 votes
1 1 answer
4.6k
4.6k views
Na462 asked May 17, 2018
4,555 views
Relation R(A1, A2, A3 ..... An) n attributes. On this relation m simple candidate key (m ≤ n). How many super keys possible in this relation?A. 2m – 1B. (2n – 1) ⋅ 2n-mC....
2 2 votes
1 1 answer
185
185 views
GO Classes asked Sep 2
185 views
Consider the relation schema $R(A,B,C,D,E)$.It is known that $R$ has exactly two candidate keys, and one of them is ${A,B}$.What are the maximum and minimum possible numb...