0 votes 0 votes R (A, B, C ,D ,E ) F={ A->B, BC-> D, D->BC, B->E, B->A } Check whether BD is C.Key or S.key . Also find the candidate key. dhairya asked Jun 18, 2016 dhairya 2.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 5 votes 5 votes BD+ ={BDEAC} D+={DBCEA} Since D alone is Ck implies BD is super key Candidate Keys D+={ABCDE} By replacing D with BC BC+={ABCDE} By replacing B with A AC+={ABCDE} These are candidate keys D,AC,BC shivanisrivarshini answered Jun 18, 2016 edited Jun 18, 2016 by LeenSharma shivanisrivarshini comment Share Follow See all 14 Comments See all 14 14 Comments reply shivanisrivarshini commented Jun 18, 2016 reply Follow Share I didn't said BD is Ck in Answer 0 votes 0 votes shivanisrivarshini commented Jun 18, 2016 reply Follow Share I mean D + is CK it doesn't mean to say that their are no other keys i used Alone to say that D is only 1Ck then BD can't be CK its Sk 0 votes 0 votes shivanisrivarshini commented Jun 18, 2016 reply Follow Share D alone CK it means that without anyother attribute extra D is CK 0 votes 0 votes Tauhin Gangwar commented Jun 18, 2016 reply Follow Share ok 0 votes 0 votes dhairya commented Jun 19, 2016 reply Follow Share What are the possible super keys...?? 0 votes 0 votes LeenSharma commented Jun 19, 2016 i edited by LeenSharma Jun 19, 2016 reply Follow Share .. 0 votes 0 votes dhairya commented Jun 19, 2016 reply Follow Share how did u find it out..? means u tried all the combinations..or applied the formula...?? 0 votes 0 votes shivanisrivarshini commented Jun 19, 2016 reply Follow Share All combinations would be easy like in this question we have D,AC,BC Ck's any combination with D i.e AD,BD,CD,DE,ABD,ACD,ADE,BCD,CDE,ABCD,ABDE,ACDEBCDE,ABCDE any combination with AC ABC,ACD,ACE,ABCD,ACDE,ABCDE (ABCD,ACD,ABCDE are repeated from above consider them once) Any combination with BC Repeated keys are considered once 1 votes 1 votes LeenSharma commented Jun 19, 2016 reply Follow Share dhairya 22 keys are possible.You can find it by combination and by formula too. Let A =Number of Keys because of CK D B= Number of Keys because of CK AC C=Number of Keys because of CK BC Number of super key = n(A) + n(B) - n(C) - n(A∩ B) - n(A∩ C) - n(B∩ C) + n(A∩ B∩ C) = 2n-1+ 2n-2 + 2n-2 - 2n-3 - 2n-3 - 2n-3 + 2n-4 Here n=5(ABCDE) =16 + 8 + 8 - 4 - 4 - 4 + 2 =22 By Combinations Super keys = D , AC , BC , AD , BD , CD , DE , ABD , ACD , ADE , BCD , BDE , CDE , ACE , BCE , ABC , ABCD , BCDE , ACDE , ABDE , ABCE , ABCDE 0 votes 0 votes dhairya commented Jun 19, 2016 reply Follow Share in that formula... why have u added last term..[ n(A∩ B∩ C) ]..?? instead of adding it should be subtracted....?? 0 votes 0 votes LeenSharma commented Jun 19, 2016 reply Follow Share i added It because many same super keys subtract two times in (A∩B) (A∩C) and (B∩C). for example ABCD is a super key for all CK's D ,AC and BC. in n(A) and n(B) and n(C) . here ABCD added 3 time and (A∩B) (A∩C) and (B∩C) Here ABCD is subtracted 3 time. it means 3 - 3 = 0 . it means we have to add ABCD one more time . 0 votes 0 votes dhairya commented Jun 19, 2016 reply Follow Share ohh..okk...f9.. So every time when we will have more than 2 C.Key.. we will subtract all the possible combination of repetetion then add 1 S.K which is the mixture of all the attributes. EX-- R (A,B,C,D,E,F) Suppose AC, DE, BF are the Candidate keys.. then , SK= n(AC)+ n(DE) +n(BF) - n( AC ∩ DE ) - n( DE ∩ BF ) - n( AC ∩ BF ) + n( ABCDEF ) Am i right...?? 0 votes 0 votes LeenSharma commented Jun 19, 2016 reply Follow Share yes,Right. It's kind of Set theory Problem. 0 votes 0 votes dhairya commented Jun 19, 2016 reply Follow Share okk...thank u @LeenSharma .. :D :D 1 votes 1 votes Please log in or register to add a comment.
6 votes 6 votes Ck with single attribute : D+ =ABCDE // This is the only Ck with single attribute Ck with 2 attributes : AC+ =ABCDE BC+ =ABCDE // These are the only 2 Ck's with 2 attributes There is no Ck with 3 attributes : There is no Ck with 4 attributes : Now your question whether BD is a Ck Or Sk you can see that D is already proven to be Ck So BD will be a Sk Here not a Ck . shekhar chauhan answered Jun 18, 2016 edited Jun 18, 2016 by shekhar chauhan shekhar chauhan comment Share Follow See all 3 Comments See all 3 3 Comments reply shivanisrivarshini commented Jun 18, 2016 reply Follow Share CEA ,CEB are super keys right 0 votes 0 votes Tauhin Gangwar commented Jun 18, 2016 reply Follow Share chauhan when...AC is candidate key how CEA can b candidate key 0 votes 0 votes shekhar chauhan commented Jun 18, 2016 reply Follow Share my mistake sorry 1 votes 1 votes Please log in or register to add a comment.