edited by
555 views
2 votes
2 votes

Let there be relation R(A, B, C, D, E) where candidate keys are A, BC and D. How many superkeys are possible?( Marks: 0.00 )

  1.   26
    Explanation:
    Answer = Number of superkeys(A) + Number of superkeys (BC) + Number of superkeys (D) – Number of superkeys (ABC) – Number of superkeys (BCD) – Number of superkeys (AD) + Number of superkeys (ABCD)
    = 24 + 23 + 24 – 22 – 22 – 23 + 21
    = 16 + 8 + 16 – 4 – 4 – 8 +2
    = 26
  2.   28
  3.   30
  4.   32

can anyone further elaborate the formula used why 2^x?

edited by

2 Answers

3 votes
3 votes
Given Relation $R\left ( A,B,C,D,E \right )$, We have the candiadate key =$A,BC \, \, and D$

Lets us denote Number of Super Key as "$N$"

Number of super key possible=$N\left ( A\, \cup\, BC\, \cup D \right )=N\left ( A \right )+N\left ( BC \right )+N\left ( D \right )-N\left ( ABC \right )-N\left ( BCD \right )-N\left ( AD \right )+N\left ( ABCD \right )$

(using basic set formula)

$\Rightarrow N\left ( A \right )$=Take A and append other left attribute$\left ( BCDE \right )$

$\Rightarrow$ you have two choices either take the left attributes$\left ( BCDE \right )$ or leave it (making it candidate key which is still a super key)$\Rightarrow$ $2^{\left | B,C,D,E \right |}=2^{4}$
1 votes
1 votes
Sk(E1 U E2 U E3)=SK(E1) + SK(E2) + Sk(E3) - Sk(E1UE2) - Sk(E2 U E3) - Sk(E3UE1) + Sk(E1 U E2 U E3)

No related questions found