This is a question from a sample midterm from my database course. The solution is not given to us for the midterm and i just wanted to ask if my solution is correct in any sense
Consider the following relation T=(N,A,I,V,L,P,C,D)
with the FD={N->AI , AV->LP, VC->PD, VL->P, LA->D, NP->IVL, CID-> LVP, AD->IP}
Find all candidate keys that consist of 3 attributes if any?
I attempted to solve the question and this is what i got:
Left Attributes = N,C
Middle Attributes = A,I,V,L,P,D
Right Attributes = None
I then made 3 attribute pairs with NC and found their closures:
NC+ = {NCAI} NO
NCA+ = {NCA} NO
NCI+ = {NCI} NO
NCV+ = {NCVPDAIL} = Get PD from VC->PD AND AI from N->AI and L from NP->IVL? Is this correct? If IV is already in there can I use this dependency to get L?
NCL+ ={NCLAIDVP} = Get AI from N->AI & D from LA->A and VP from CID->LVP using same logic from above?
NCP+ = {NCPAIVLD} straight forward using same logic from above
NCD+ = {NCDAILVD} YES
So i got 4 candidate keys that have 3 attributes in them. which are NCV, NCL, NCP, NCD.
So did i nail it or there should only be one candidate key which should be NCD?
Thank you!