33 views
Q. R(A,B,C,D,E,F) with {A,BC,CD} candidate keys.How many super keys possible?
ago | 33 views
0
My answer is 48 . It is true?
0
$$|\{A, AF, AE, AEF, BC, BCF, BCE, BCEF, CS, CDF, CDE, CDEF, ABC, ABCF, ABCE, ABCEF, ACD, ACDF, ACDE, ACDEF, ABCD, ABCDF, ABCDE, ABCDEF\}| = 24$$

How 48? I am getting 24.

We can solve it using Inclusion-Exclusion principle.

Let “a” denote set of all super keys which have “A” as one of the attributes.

Let “bc” denote set of all super keys which have “BC” as two of the attributes.

Let “cd” denote set of all super keys which have “CD” as two of the attributes.

Now, our answer to “number of super keys” will be :

$a \cup bc \cup cd = |a| + |bc| + |cd| – |abc| – |acd| – |bcd| + |abcd|$

$|a| = 2^5 ; |bc| = 2^4 ; |cd| = 2^4 ; |abc| = 2^3 ; |acd| = 2^3 ; |bcd| = 2^3 ; |abcd| = 2^2$

$a \cup bc \cup cd = 44$

$$|\{A, AF, AE, AEF, BC, BCF, BCE, BCEF, CS, CDF, CDE, CDEF, ABC, ABCF, ABCE, ABCEF, ACD, ACDF, ACDE, ACDEF, ABCD, ABCDF, ABCDE, ABCDEF\}| = 24$$