2,979 views
3 3 votes
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 ____________________

2 Answers

Best answer
4 4 votes
First, find candidate key and they are A,C,E

According to the principle of inclusion and exclusion,

           ∣A ⋃ C ⋃ E∣ = |A| + |C| + |E| - |A ⋂ C| - |A ⋂ E|  - | C ⋂ E| + |A ⋂ C ⋂ E|

                                 = No. of super key using A + No. of superkey using C + No. of superkey using E - No. of superkeys  using A                                               and C - No. of super keys  using A and E - No. of superkeys  using C and E

                                          + No. of super keys using A,C,E

                                 = $2^{n-1}$ + $2^{n-1}$ + $2^{n-1}$ - $2^{n-2}$ - $2^{n-2}$ - $2^{n-2}$ + $2^{n-3}$ , Here n = 5 (No. of attributes in a relation)

                                 = $2^4$ + $2^4$  + $2^4$ - $2^3$ - $2^3$ - $2^3$ + $2^2$

                                 = 28

So the answer is : 28

Note: In general, if we have ‘N’ attributes with one candidate key then the number of possible superkeys are $2^{n-1}$.
• selected by
0 0 votes

Here, Candidate Keys = $ \{ A, E, C\} $

Prime Attributes = $ \{ A, E, C\} $
Non-Prime Attributes = $ \{ B, D\} $

Combinations with only Prime Attributes $= \binom{3}{1} + \binom{3}{2} + \binom{3}{3} = 3+3+1 = 7$
Now, for total combinations $\rightarrow$ A_C_E (B and D can either be present or not present = $2^2$ Combinations)

Therefore, # Superkeys $= 7 * 2^2 = 28$

Position:
Show:

Related questions

4 4 votes
2 2 answers
2.7k
2.7k views
Ram Swaroop asked Jan 30, 2019
2,686 views
Consider the following relation R(A1, A2,...A15) with (A1,A2, ... A6) of relation R are simple candidate key. The number of possible superkey in relation R is_
5 5 votes
2 2 answers
2.3k
2.3k views
Tushar Shinde asked Jan 18, 2016
2,266 views
Consider a relation $R$ with $2n$ attributes. Assume any $2n/2$ of the attributes constitutes key. Total number of super keys possible are:$^{2n}C_{2^{n-1}}\times \left(2...
2 2 votes
1 1 answer
158
158 views
GO Classes asked Sep 2
158 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...
2 2 votes
2 answers 2 answers
2.0k
2.0k views
ssm asked Apr 18, 2024
2,006 views
R(A1, A2,A3,A4....AN). How many super keys possible in relation? If (A1 is candidate key, A2 is candidate key, A3 is candidate key)