Let be the following Realtion R={UtilisateurID, Nom, Prenom, AdresseEmail, Login, Passwd, ServeurMail}
with the functional dependencies:
F = { UtilisateurID → Nom, Prenom
UtilisateurID, ServeurMail → Login, Passwd;
AdresseEmail → UtilisateurID;
AdresseEmail → ServeurEmail;
}
What are all minimal keys?
I said that it was K = { AdresseEmail }
as far it gived every others.
In order to put it BCNF I had the following algorithm
We take X→A from F
We create R¹(X,A)
F¹={X → A} R¹ BCNF
R²=R-{A}
E¹:F²=FD from F except those that affect A.
E²: IF R² is BCNF → END
ELSE We decompose R2 returning to E¹
So I did:
R isn't BCNF because no FD looks like key → attribute ¬key
R¹={AdresseEmail, ServeurEmail}
E1: F¹={AdresseEmail → ServeurEmail}
R²=(UtilisateurID, Nom, Prenom, AdresseEmail, Login, Passwd)
F²=(UtilisateurID → Nom, Prenom
AdresseEmail → UtilisateurID
)
So my BCNF decomposition would actually be:
R¹=(AdresseEmail, ServeurMail)
and
R²=(UtilisateurID, Nom, Prenom, AdresseEmail, Login, Passwd).
But we lost AdresseMail → ServeurEmail
It isn't trivial, X is a (sur)key and A hasn't key attributes therefore it is BCNF.
Is my decomposition right? Did I did a mistake when designing the key?
R²=R-{A}
. Isn'tA = ServeurEmail
in the application of the algorithm? Why wasUtilisateurID
removed from R2 and notServeurEmail
? – ypercubeᵀᴹ Apr 29 '16 at 10:12(A,X)
andR-{A}
? Beacuse you removed theUtilisateurID, ServeurMail → Login, Passwd
FDs this way (after the last edit). – ypercubeᵀᴹ Apr 29 '16 at 13:05ServeurMail
in R2 to let the DFUtilisateurID, ServeurMail → Login, Passwd
, but I addedAdresseEmail → UtilisateurID
which I forget. Therfore it doesn't seems BCNF enven if my algorithm doesn't seems to be very accurate... Do you have one better if this one isn't the best? – Revolucion for Monica Apr 29 '16 at 17:33