edited by
223 views
1 votes
1 votes

The maximum number of super keys for the relation schema $R(A_{1},A_{2},A_{3},A_{4},\dots, A_{n})$ with $A_{1}A_{2}$ and $A_{1}A_{3}$ as the candidate key is _________

  1. $2^{n-1} + 2^{n-1} - 2^{n-2}$
  2. $2^{n-1} - 2^{n-3}$
  3. $2^{n-2} - 2^{n-2} - 2^{n-3}$
  4. $2^{n-1} + 2^{n-2} - 2^{n-3}$
edited by

1 Answer

Best answer
3 votes
3 votes
With $A_{1}A_{2}$ as candidate key, the number of super keys, $SK(A_{1}A_{2})  = 2^{n-2}$ (any subset of the remaining $n-2$ attributes including the empty set form a super key.

Similarly with $A_{1}A_{3}$ as candidate key, the number of super keys, $SK(A_{1}A_{3})  = 2^{n-2}$
    
And with $\{A_{1}A_{2}A_{3}\}$ as candidate key
the number of super keys, $SK(A_{1}A_{2}A_{3})  = 2^{n-3}.$  

Now, the total number of distinct super keys $SK(A_{1}A_{2},A_{1}A_{3}) = SK(A_{1}A_{2}) + SK(A_{1}A_{3}) - SK(A_{1}A_{2}A_{3})$

$\qquad = 2^{n-2} + 2^{n-2} - 2^{n-3}=2^{n-1} - 2^{n-3}.$

So, the correct answer is $(B).$
selected by
Answer:

Related questions

1 votes
1 votes
1 answer
2
gatecse asked Oct 8, 2020
190 views
The maximum number of super keys for the relation schema $R(A_{1},A_{2},A_{3},A_{4},A_5)$ with two candidate keys $A_{1}$ and $A_{2}$ is ________
1 votes
1 votes
1 answer
3
gatecse asked Oct 8, 2020
77 views
The following table has two attributes $A$ and $B$ where $A$ is the primary key and $B$ is the foreign key referencing $A$ with on-delete cascade.$$\begin{array}{|c|c|} \...