400 government jobs open · updated 6 Dec 2026 See the list →
GyanDesk
Latest jobs
Menu

Functional Dependencies and Decomposition in DBMS

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.

Key terms and distinctions
ConceptMeaningExample / distinction
Trivial dependencyY is a subset of X{ID, Name} → Name
Full dependencyThe entire determinant is neededStudentID + CourseID → Grade
Partial dependencyA proper subset of a candidate key determines a non-prime attributeCourseID → CourseName in an enrolment relation
Transitive dependencyOne dependency follows through anotherID → Department and Department → Office
Attribute closure X+All attributes implied by X using the FDsUse it to test super keys
Lossless vs preservingCorrect reconstruction vs enforcing FDs within partsThese 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?

  1. The shared attribute is B. B→BC holds by B→C plus reflexivity, so the intersection determines R2. The binary decomposition is lossless.
  2. A→B can be checked in R1. B→C can be checked in R2. Both original dependencies are preserved.
  3. Do not infer that every split is safe. With no suitable dependency, a join can create extra combinations called spurious tuples.
  1. Intersection R1 ∩ R2
  2. Does it determine R1 or R2?
  3. Yes → binary split is lossless
Armstrong’s rules, minimal cover and lossless decomposition

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