Professional Documents
Culture Documents
DBMS Lab - 29 - SQL Dependencies
DBMS Lab - 29 - SQL Dependencies
DBMS Lab - 29 - SQL Dependencies
LAB No. 29
FUNCTIONAL DEPENDENCY
Functional Dependency
A functional dependency is a constraint between two sets of attributes in a database
table.
It specifies that the value of one attribute (or set of attributes) determines the value of
another attribute.
It's denoted as X → Y, where X is the determinant and Y is the dependent.
In a table of employees
Let’s Consider the following table and check the functional dependencies.
Reason: If we remove the CourseID, Grade is not dependent on Instructor and if we remove
the Instructor, Grade is not dependent on CourseID but if both are present then dependency is
present and this dependency is called fully functional dependency.
Reason: If we remove the CourseID, Grade is dependent on StudentID and if we remove the
StudentID, Grade is not dependent on CourseID, so, if dependency is present due any one of
the attribute then this dependency is called partial functional dependency.
Practice Questions
Table 3: Order Table
Question: