Awesome q2a theme
+3 votes
33 views
Q. R(A,B,C,D,E,F) with {A,BC,CD} candidate keys.How many super keys possible?
ago in Databases by (49 points) | 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.

2 Answers

0 votes
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 $

So, answer is 44.
ago by (1.5k points)
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$$

 

What is missing?
+1
If you only consider Super keys which have A in them, then also that it 32. So, you have not even included super keys consisting of A.
0 votes
Getting 44 by applying principle of inclusion exclusion method to the 3 groups of CKs(A,BC,CD)
ago by (9 points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
9,106 questions
3,157 answers
14,595 comments
95,958 users