459 views
0 votes
0 votes
R ( A, B, C, D)

A & B are the candidate keys .

what are the possible  Super keys and there no ..??

3 Answers

3 votes
3 votes

Number of super keys with A =n(A)=A _ _ _ =23

Number of Super keys with B =n(B)= _ B _ _ =23

n(A∩B) = common super keys in A ,B = 4     (ABCD,ABC,ABD,AB)

Total Number of super keys with A,B are n(AUB)=n(A)+n(B)-n(A∩B) =8+8-4 = 12

those are A,AB,AC,AD ,B,BC,BD,ABD,ACD,ABC ,BCD,ABCD

1 votes
1 votes

THIS IS WITH FORMULA POINT OF VIEW

A IS THE CANDIDATE KEY=>B,C,D ARE REST ATTRIBUTES=>NUM OF SUPER KEYS= 2^3=8

B IS THE CANDIDATE KEY=>A,C,D ARE REST ATTRIBUTES=>NUM OF SUPER KEYS= 2^3=8

C,D ARE THE COMMON ATTRIBUTES IN BOTH THE REST ATTRIBUTES => NUM OF KEYS=2^2=4

SO # OF SK=8+8-4=12

NOW WITH LOGIC

A IS CK=>{A,AB,AC,AD,ABC,ACA,ABD,ABCD}=8 NOS

B IS CK=>{B,BA,BC,BD,BAC,BAD,BCD,ABCD}=8 NOS

COMMON IN A AND B={AB,ABC,ABD,ABCD}=4 NOS

REMOVE COMMON=8+8-4=12

Related questions

0 votes
0 votes
3 answers
2
Na462 asked May 12, 2018
1,467 views
Consider the following relational schema R(ABCDE). The number of super keys in relation R if every two attributes of relation R is candidate keys are __________.Please ex...
1 votes
1 votes
1 answer
3
hacker16 asked Jan 17, 2018
2,700 views
R (A1, A2, ….An) and every (n-2) attributes of R forms a candidate key. How many superkeys are there in R?a) $_{n-2}^{n}\textrm{C}$b) $_{n-2}^{n}\textrm{C}$ * 4c) $_{n-...
7 votes
7 votes
1 answer
4
Lakshman Bhaiya asked Sep 5, 2017
606 views
$R=(A,B,C,D,F,H)$Candidate key$=(AEH, BEH, DEH)$How many super key possible?