What is Partial Dependency in DBMS?
The partial dependency in DBMS occurs when a non-prime attribute, say z, depends on the proper subset of attribute x, say y. A pictorial representation of the same is as follows:
Here x is any candidate key and y ⊂ x, and z is some non-prime attribute, then y → z is a partial dependency.
Partial dependency is undesirable, and therefore it is eliminated from the second normal form during the normalization process.
Partial Dependency in DBMS Examples
To understand the partial dependency in DBMS better, we will see an example and learn how we can detect a partial dependency given a set of functional dependencies for a relation.
Example: Consider a relation R(ABC) with a set of functional dependencies AB → C, C → A, and find whether there exists any functional dependency or not?
Solution: First, we find the candidate keys for the relation R to find the partial dependency.
The candidate keys are AB and BC as AB+ ={ABC}, and BC+ ={ABC}.
Now we proceed to find the partial dependency in the FD set as we know that AB is the candidate key. Hence, AB → C is not the case of partial dependency, while in the FD C → A, attribute C is a proper subset of the candidate key BC. Therefore, it forms the partial dependency.
Practice Questions on Partial Dependency in DBMS
Few practice problems will boast the concept of understanding the partial dependency in DBMS. Let us see a few practice problems.
Example 1: X → Z is said to be partial dependency if:
- X is a proper subset of candidate key
- X is a prime attribute
- Both A and B
- None of the above
Answer: Option C
Example 2: Consider the relation R(ABCDEFGH) with FDs as:
{
AB → CEFGH
A→D
F → G
FB → H
HBC → ADEFG
FBC → ADE
}
Find the partial dependency present in R.
Answer: A→D
Comments
write a comment