442 views
A relation $R(P,Q,R,S)$ has $\{PQ, QR, RS, PS\}$ as candidate keys. The total number of superkeys possible for relation $R$ is ______

reshown
@bikram sir, shouldnt the answer be 8 ??
 @Bikram sir, shouldnt the answer be 8 ??
yes, answer should be 8.

with 4 elements i.e. {P,Q,R,S}, the number of combinations possible are 24 i.e. 16. Now from these 16 exclude o length and 1 length elements. thus 16-5 = 11. now with the length of 2 two combinations are not candidate keys i.e. PR and QS. So subtract these 2 also.

Hence 11-2 i.e. 9 are the candidate keys

Number of Superkeys which are superset of PQ = 2^2 = 4

Number of Superkeys which are superset of QR = 2^2 = 4

Number of Superkeys which are superset of PS = 2^2 = 4

Number of Superkeys which are superset of RS = 2^2 = 4

Number of Superkeys which are superset of PQR = 2^1 = 2

Number of Superkeys which are superset of PQS = 2^1 =2

Number of Superkeys which are superset of PRS = 2^1 =2

Number of Superkeys which are superset of QRS = 2^1 = 2

Number of Superkeys which are superset of PQRS = 2^0 = 1

So, applying the formula of Set theory, the total number of Superkeys possible on given relation are = 4+4+4+4-2-2-2-2+1 = 9
 PQRS QRPS RSPQ PSQR PQR QRP RSP PSQ PQS QRS RSQ PSR PQ QR RS PS

No need to take others as they are repeated. You can take any one of them, just ensure that you have not taken them two times.

1
1 vote
2
203 views
3
221 views