The Gateway to Computer Science Excellence
+2 votes
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 ________________.
in Databases by Active (1.3k points)
edited by | 285 views

2 Answers

+4 votes
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.
0 votes

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

(A3A4)= A3A4

(A1A3A4)= A1A2A3A4A5

(A2A3A4)= A1A2A3A4A5

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

​​​​​​​Answer is 3.

by Active (4.8k 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
50,737 questions
57,366 answers
198,496 comments
105,265 users