Consider the table below of movie data. Each studio can produce many movies. A m
ID: 3690450 • Letter: C
Question
Consider the table below of movie data. Each studio can produce many movies. A movie can have many stars and a star may acts in many different movies. Find all functional dependencies between the attributes of this table. The table below lists customer/car hire data. Each customer may hire cars from various outlets throughout Glasgow. A car is registered at a particular outlet and can be hired out to a customer on a given date. Find all functional dependencies between the attributes of this tableExplanation / Answer
In the above first table of movie data to find out the fuctional dependency
Functional Dependencies
FD's are constraints on well-formed relations and represent a formalism on the infrastructure of relation.
Definition: A functional dependency (FD) on a relation schema R is a constraint X Y, where X and Y are subsets of attributes of R.
Definition: an FD is a relationship between an attribute "Y" and a determinant (1 or more other attributes) "X" such that for a given value of a determinant the value of the attribute is uniquely defined.
Definition: An FD X Y is satisfied in an instance r of R if for every pair of tuples, t and s: if t and s agree on all attributes in X then they must agree on all attributes in Y
A key constraint is a special kind of functional dependency: all attributes of relation occur on the right-hand side of the FD:
answer)
• Non-prime attributes depend on candidate keys – Consider non-prime attribute ‘a’ – Then FD X s.t. X -> a and X is a candidate key
• Counterexample
– Movies(title, year, lenght,genre,studioName,starName)
– FD: title, year -> studioName, star Name
Table 2: