So to sum it all up, i am having major difficulties understanding functional dependencies just by looking at abstract examples and would really appreciate some help of understanding with possible real life situations. I want to see if these functional dependencies is any BCNF violation. I have read alot of explainations but im still struggling with understanding fully and i cannot understand the full picture only by looking at characters such as the below. I feel like i need some real data to think of, and therefor my examples below.
R(A,B,C,D,E) where functional dependencies are AB -> C, DE -> C, and B -> D.
I am trying here with different examples and scenarios and got this. Not sure if im thinking totally wrong. But here i go.
Employee(employee_id, firstname, lastname, title, department)
AB -> C, employee_id, firstname -> lastname (lastname can be determined by employee_id and firstname). lefthand side is a key so no bcnf violation?
DE -> C, title, department -> lastname (lastname of specific employee can NOT be determined by title and department. a bcnf violation, because lefthand side contain no key attribute?
B -> D, firstname -> title (title of employee can not be determined by only firstname, because it can exist several employees with same firstname? and lefthand side has no key attribute, => bcnf violation?
My question now is, these FD 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?
If i try another example with the same FD and relation.
Movie(movieName, published, starName, age, address)
movieName, published -> starName (starnName can be determined from movieName and published. no bcnf violation?
age, address -> starName (starName cannot be determined from age and address. bcnf violation?
published -> age (age of the movie can be determined from published. No bcnf violation?
I would really really appreciate some guidance.
Thanks.