C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Functional DependencyThe functional dependency is a relationship that exists between two attributes. It typically exists between the primary key and non-key attribute within a table. X → Y The left side of FD is known as a determinant, the right side of the production is known as a dependent. For example: Assume we have an employee table with attributes: Emp_Id, Emp_Name, Emp_Address. Here Emp_Id attribute can uniquely identify the Emp_Name attribute of employee table because if we know the Emp_Id, we can tell that employee name associated with it. Functional dependency can be written as: Emp_Id → Emp_Name We can say that Emp_Name is functionally dependent on Emp_Id. Types of Functional dependency1. Trivial functional dependency
Example: Consider a table with two columns Employee_Id and Employee_Name. {Employee_id, Employee_Name} → Employee_Id is a trivial functional dependency as Employee_Id is a subset of {Employee_Id, Employee_Name}. Also, Employee_Id → Employee_Id and Employee_Name → Employee_Name are trivial dependencies too. 2. Non-trivial functional dependency
Example: ID → Name, Name → DOB
Next TopicDBMS Inference Rule
|