285 views
A relation $R$ with $5$ attributes $A_1,A_2,A_3,A_4,A_5$. Given the following FDs

$A_1\rightarrow A_2$

$A_2A_3\rightarrow A_5$

$A_4A_5\rightarrow A_1$

the number of candidates keys that includes attribute $A_3$ is ________________.

edited | 285 views

3, A3A4A1,A3A4A2,A3A4A5
by Boss (17.1k points)
0
Can you explain a bit how you derived it?
+4
Given R(A1,A2,A3,A4,A5 )

Now by seeing FD , you can derive A2,A5,A1 ... so remaining attribute should also be in candidate key ...

So A3A4 must be in ck .. but

A3A4 + (closure of A3A4) = A3A4 , only so its not candidate key bcoz it does not derive all attribute of relation

now Consider A3A4A1 +(closure of A1A3A4)= A3,A4,A1,A2,A5  SO IT derive all attribute of relation

similar A3A4A2  and A3A4A5 also derive all attribute ...
0
Thank you sonam, that helps.

A3 and A4 is independent attribute.
So A3 and A4 must be in Candidate Key.

(A3A4)= A3A4

(A1A3A4)= A1A2A3A4A5

(A2A3A4)= A1A2A3A4A5

​​​​​​​(A5A3A4)= A1A2A3A4A5

by Active (4.8k points)