Which of the following best describes a functional dependency in a database?
Think about how one piece of data can determine another in a table.
A functional dependency means that if you know the value of one attribute (or set of attributes), you can find exactly one value of another attribute. This is key in database design.
In the notation A → B, what does this represent in terms of functional dependency?
Look at the arrow direction carefully.
The arrow points from the determinant to the dependent attribute. So, A → B means A determines B.
Given a table with columns StudentID, StudentName, and Major, which functional dependency is correct?
Consider which attribute uniquely identifies a student.
StudentID uniquely identifies a student, so it determines the StudentName. The reverse is not necessarily true because names can repeat.
What is the impact of violating a functional dependency in a database table?
Think about what happens when one attribute does not uniquely determine another.
Violating functional dependency can lead to duplicate or conflicting data, causing redundancy and inconsistency.
Consider the following data in a table:
EmployeeID | Department 1 | Sales 2 | Sales 3 | HR 4 | HR 5 | Sales
Which functional dependency is true based on this data?
Check if one attribute value always leads to exactly one value of the other.
Each EmployeeID corresponds to exactly one Department, so EmployeeID determines Department. But one Department has many EmployeeIDs, so Department does not determine EmployeeID.