database - Combinations of attributes that can form a key for a relation with functional dependencies? -


i have homework problem supposed do. issue is, tutorials i've read or watched can't seem prepare me solve problem:

consider relation r(a,b,c,d,e,f) fd's: cde -> b acd -> f bef -> c b   -> d combination of attributes can form key r? 

i don't know how start. tutorial, told me make table this:

left | middle | right ---------------------- ae   | bcdf   | 

where "left" refers appearing on left hand side of dependency, , "middle" refers appearing on both left , right hand side.

from there supposed find closure of a, e, or ae see closure me abcdef. however, find no such closure.

does have tips use on problem, or have better ideas on how approach solving it?

"left" attributes should in key. however, since point out closure of ae ae itself, need add more attributes extend ae , make key.

let start adding b, i.e., considering abe. closure of abe abde due b -> d. since there still attributes not cover (c , f) need continue add more attributes. let add c , consider abce. then, closure of abce abcdef since b->d , acd->f. hence, abce superkey. please note argument not mean abce candidate key (which happens in case) since still might contain redundant attribute.

moreover, not mean abce unique. instance, instead of adding c have added f , obtained abef superkey. alternatively, instead of adding b in first place have chosen different attribute. consider following diagram

ae (ae)+ not equal (abcdef) hence add attributes: option 1: add b. (abe)+ = (abde), not equal (abcdef) hence add attributes:         option 1.1 add c. (abce)+ = (abcdef), report (abce) superkey         option 1.2 add f. (abef)+ = (abcdef), report (abef) superkey  option 2: add c. (ace)+ = (ace), not equal (abcdef) hence add attributes:         option 2.1 add b. step not needed since have discussed (abce) in 1.1         option 2.2 add d. (acde)+ = (abcdef), report (acde) superkey          option 2.3 add f. (acef)+ = (acef), not equal (abcdef) hence add attributes:             option 2.3.1. add b. (abcef) contains (abce) considered in 1.1, hence superkey.             option 2.3.2. add d. (acdef) contains (acde) considered in 2.2, hence superkey. option 3. add d.        ...  option 4. add f.          ... 

Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -