1 votes 1 votes Consider a relation schema r(A, B, C, D, E, F) and attribute A is element of every candidate key of r. Maximum number of possible candidate keys of r is ________. Databases made-easy-test-series databases candidate-key + – Shreya2002 asked Aug 9, 2022 Shreya2002 1.7k views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Kabir5454 commented Aug 9, 2022 reply Follow Share is the answer 10? 0 votes 0 votes Shreya2002 commented Aug 9, 2022 reply Follow Share Yes according to made easy answer is 10 please explain how…. 0 votes 0 votes Kabir5454 commented Aug 9, 2022 reply Follow Share It is saying maximum number of possible candidate key which contain attribute “A”. Now say if A is the candidate key then any other candidate key is not possible as if A is already a candidate key any key which contains A is a super key. So ,A can’t be a candidate key to get maximum no of candidate key. Next take size 2 candidate key :- {AB,AC,AD,AE,AF} these are the size two candidate key possible. So till now we got we can get 5 maximum candidate key of size 2. Now if consider these 5 are possible candidate key then there can’t be any other candidate key possible which will contain attribute A as any candidate key of size 3 then will be a super-key. So we should check for size 3 candidate keys. Size 3 candidate key :- no of size 3 candidate key is 5c2=10 {ABC,ABD,ABE,ABF,ACD,ACE,ACF,ADE,ADF,AEF} this the maximum no of candidate key possible . Size 4 candidate key:- no of size 4 candidate possible is 5c3=10 So size 4 also a possibility . But we can take only one of the either size 3 or size 4 size candidate keys not both because if we consider size 3 then size 4 candidate keys are super key not candidate key and if we consider size 4 then trivially we consider no size 3 candidate key are not there. So we can get maximum 10 candidate key which is of either size 3 or size 4 . 8 votes 8 votes Shreya2002 commented Aug 9, 2022 reply Follow Share Thanku sir…. 0 votes 0 votes Kabir5454 commented Aug 9, 2022 reply Follow Share @Shreya2002 don’t call me sir ..I am a aspirant.😁 0 votes 0 votes abhinowKatore commented Aug 24, 2022 reply Follow Share Thank you for the explanation ✅ 1 votes 1 votes Please log in or register to add a comment.
Best answer 3 votes 3 votes Maximum number of candidate keys for a relation can be given by:$\binom{n}{\left \lceil n/2 \right \rceil}$. For example R(A,B,C,D) have AB,BC,CD,AD,BD .Here A is fixed in any candidate key, so for other 5 attributes we have $\binom{5}{\left \lceil 5/2 \right \rceil} = 10$ keys. So, answer is 10. Reference: sql - finding largest number of candidate keys that a relation has? - Stack Overflow kathan Mistry answered Aug 9, 2022 • edited Aug 9, 2022 by kathan Mistry kathan Mistry comment Share Follow See all 0 reply Please log in or register to add a comment.