I am having major difficulties understanding functional dependencies just by looking at abstract examples like this:
R(A,B,C,D,E)
AB -> C, DE -> C, and B -> D
So I seek feedback on corresponding real life situations.
I want to see if these functional dependencies violate BCNF.
R(A,B,C,D,E)
: Employee (employee_id, firstname, lastname, title, department)
AB -> C
: employee_id, firstname -> lastname
lastname can be determined by employee_id and firstname. Left hand side is a key so no BCNF violation?
DE -> C
: title, department -> lastname
lastname of a specific employee cannot be determined by title and department. The left hand side contains no key attribute so BCNF violation?
B -> D
: firstname -> title
title of employee cannot be determined by only firstname, because there can exist several employees with same firstname? And the left hand side has no key attribute so BCNF violation?
For these FDs for the above relation, MUST it be the same result on every example that I test with? Or does it depend on each relation and what attributes they have, and in which order?
Another example with the same FDs and attributes.
R(A,B,C,D,E)
: Movie (movieName, published, starName, age, address)
AB -> C
: movieName, published -> starName
starName can be determined from movieName and published. No BCNF violation?
DE -> C
: age, address -> starName
starName cannot be determined from age and address. BCNF violation?
B -> D
: published -> age
age of the movie can be determined from published. No BCNF violation?