IBPS IT Officer · Government IT exam preparation
Functional Dependencies and Decomposition in DBMS
Armstrong’s rules, minimal cover and lossless decomposition.
Dependencies & decomposition: the core idea
A functional dependency X → Y means that any two valid rows with the same X values must have the same Y values. X is called the determinant. The rule comes from the meaning of the data, not just a coincidence in a small sample.
If StudentID identifies one student, StudentID determines StudentName. Two rows with StudentID 12 cannot legitimately name different students under that rule. StudentName may not determine StudentID because names can repeat.
| Concept | Meaning | Example / distinction |
|---|---|---|
| Trivial dependency | Y is a subset of X | {ID, Name} → Name |
| Full dependency | The entire determinant is needed | StudentID + CourseID → Grade |
| Partial dependency | A proper subset of a candidate key determines a non-prime attribute | CourseID → CourseName in an enrolment relation |
| Transitive dependency | One dependency follows through another | ID → Department and Department → Office |
| Attribute closure X+ | All attributes implied by X using the FDs | Use it to test super keys |
| Lossless vs preserving | Correct reconstruction vs enforcing FDs within parts | These are separate properties |
Exam essentials
Meaning of X→Y
Whenever two legal tuples agree on X, they must agree on Y. It does not mean Y is computed by multiplication or that X and Y contain equal values. A small sample may disprove a dependency but cannot prove the rule holds for all future legal data.
Armstrong’s axioms
Reflexivity: if Y is a subset of X, then X→Y. Augmentation: X→Y implies XZ→YZ. Transitivity: X→Y and Y→Z imply X→Z. These rules are sound and complete for functional-dependency inference.
Derived rules
Decomposition: X→YZ implies X→Y and X→Z. Union: X→Y and X→Z imply X→YZ. Pseudotransitivity: X→Y and WY→Z imply WX→Z. You may split a right side, but you cannot simply drop attributes from a left side.
Minimal cover
Split right sides into single attributes, remove extraneous left-side attributes, then remove redundant dependencies using closure tests. Keep the resulting set equivalent to the original. A minimal cover need not be unique.
Binary lossless test
For R decomposed into R1 and R2 under functional dependencies, the split is lossless if their intersection determines all attributes of R1 or all attributes of R2 in F⁺. Dependency preservation is a different test: combine projected dependencies and compare their closure with F⁺.
Worked exam problem
R(A,B,C), F = {A→B, B→C}, is decomposed into R1(A,B) and R2(B,C). Is this split lossless and dependency-preserving?
- The shared attribute is B. B→BC holds by B→C plus reflexivity, so the intersection determines R2. The binary decomposition is lossless.
- A→B can be checked in R1. B→C can be checked in R2. Both original dependencies are preserved.
- Do not infer that every split is safe. With no suitable dependency, a join can create extra combinations called spurious tuples.
- Intersection R1 ∩ R2
- Does it determine R1 or R2?
- Yes → binary split is lossless
Practical example
For R(A,B,C), let A → B and B → C. Start with A. Add B, then C. A+ is {A,B,C}, so A is a super key. Splitting into AB and BC is lossless here because the common attribute B determines BC.
F = { A → B, B → C }
Start A+ = {A}
After A → B: {A,B}
After B → C: {A,B,C}Common exam traps
- A sample with unique values does not prove a permanent functional dependency.
- For a binary decomposition, a common lossless test is whether the shared attributes determine one whole part under F+.
- Dependency preservation means the original FDs can be enforced from projected dependencies without joining tables.
Verified previous-year questions
GATE questions, paraphrased for clarity and checked against official answer keys. These are not IBPS past-paper claims. MSQ means more than one option may be correct.
Exam practice: apply the rules
Six original questions with plausible alternatives and worked explanations. These are practice questions, not previous-year questions.
Current usage and product differences
Design tools may suggest keys from observed data, but business rules must confirm them. A BCNF decomposition can lose dependency preservation. A suitable 3NF synthesis can provide both lossless join and dependency preservation under the usual relational assumptions.
References
Technical reference · Database System Concepts: chapter references