Open In App

Differentiate between Partial Dependency and Fully Functional Dependency

Last Updated : 24 Dec, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

Fully Functional Dependency :
If X and Y are an attribute set of a relation, Y is fully functional dependent on X, if Y is functionally dependent on X but not on any proper subset of X.
Example  –
In the relation ABC->D, attribute D is fully functionally dependent on ABC  and not on any proper subset of ABC. That means that subsets of ABC like AB, BC, A, B, etc cannot determine D.
Let us take another example – 

Supply table 

supplier_id item_id price
1 1 540
2 1 545
1 2 200
2 2 201
1 1 540
2 2 201
3 1 542

From the table, we can clearly see that neither supplier_id  nor item_id can uniquely determine the price but both supplier_id and item_id together can do so. So we can say that price is fully functionally dependent on { supplier_id, item_id }. This summarizes and gives our fully functional dependency −

{ supplier_id , item_id } -> price

Partial Functional Dependency :
A functional dependency X->Y is a partial dependency if Y is functionally dependent on X and Y can be determined by any proper subset of X.
For example, we have a relationship  AC->B, A->D, and D->B. 
Now if we compute the closure of {A+}=ADB 
Here A is alone capable of determining B, which means B is partially dependent on AC.
Let us take another example –

Student table

name roll_no course
Ravi 2 DBMS
Tim 3 OS
John 5 Java

Here, we can see that both the attributes name and roll_no alone are able to uniquely identify a course. Hence we can say that the relationship is partially dependent.

Differences between Full Functional Dependency and Partial Functional Dependency:

 

Full Functional Dependency 

Partial Functional Dependency

1. A functional dependency X->Y is a fully functional dependency if Y is functionally dependent on X and Y is not functionally dependent on any proper subset of X. A functional dependency X->Y is a partial dependency if Y is functionally dependent on X and Y can be determined by any proper subset of X.
2. In full functional dependency, the non-prime attribute is functionally dependent on the candidate key. In partial functional dependency, the non-prime attribute is functionally dependent on part of a candidate key.
3. In fully functional dependency, if we remove any attribute of X,  then the dependency will not exist anymore. In partial functional dependency, if we remove any attribute of X,  then the dependency will still exist.
4. Full Functional Dependency equates to the normalization standard of Second Normal Form. Partial Functional Dependency does not equate to the normalization standard of Second Normal Form.  Rather, 2NF eliminates the Partial Dependency. 
5. An attribute A is fully functional dependent on another attribute B if it is functionally dependent on that attribute, and not on any part (subset) of it. An attribute A is partially functional dependent on other attribute B if it is functionally dependent on any part (subset) of that attribute.
6. Functional dependency enhances the quality of the data in our database. Partial dependency does not enhance the data quality. It must be eliminated in order to normalize in the second normal form.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads