Partial Dependency (Partial Key Dependency)
A partial dependency exists in a relation when a non-prime attribute depends on part of a candidate (composite) key, rather than on the whole key.
Definition
In a relation R, if A → B where A is a proper subset of a composite key,
and B is a non-prime attribute, then B is partially dependent on the key.
Example
R(StudID, CourseID, StudName) Primary Key = (StudID, CourseID) ← composite key FD: StudID → StudName
Here, StudID is only a part of the full key. StudName (a non-key attribute) depends only on StudID. So StudName is partially dependent on the primary key. This situation is called Partial Dependency.
Why is it important?
Partial dependency causes redundancy and leads to anomalies:
- Redundancy
- Insertion anomalies
- Update anomalies
- Deletion anomalies
Normalization: Removing partial dependencies by decomposing the relation into tables that eliminate such dependencies is the goal of Second Normal Form (2NF).
No comments:
Post a Comment