Redundant FD & Extraneous Attributes

Redundant Functional Dependency in DBMS

A Redundant Functional Dependency is a dependency that can be removed from the set of functional dependencies without affecting the overall closure of the set.

πŸ‘‰ If removing a functional dependency does NOT change the closure β†’ it is redundant

In simple words, a redundant FD is unnecessary because it can be derived from other functional dependencies.

πŸ“Š Example

A β†’ B
B β†’ C
A β†’ C

πŸ” Analysis

  • A β†’ B and B β†’ C are given
  • Using transitivity: A β†’ C can be derived
πŸ‘‰ A β†’ C is Redundant

βš™οΈ How to Check Redundant Functional Dependency

  • Step 1: Remove one functional dependency
  • Step 2: Compute closure using remaining dependencies
  • Step 3: If removed dependency can still be derived β†’ it is redundant
πŸ‘‰ Closure is used to verify redundancy

πŸ“Š Deep Example (GATE Level)

F = { A β†’ B, B β†’ C, A β†’ C }

Check if A β†’ C is redundant:

Remove A β†’ C and compute closure of A:

A⁺ = {A, B, C}

Since we still get C using A β†’ B and B β†’ C, the dependency A β†’ C is redundant.

Final Set: A β†’ B, B β†’ C

πŸ’£ Why Remove Redundant Functional Dependencies?

  • To simplify the set of dependencies
  • To achieve Minimal Cover
  • To remove unnecessary complexity
  • To improve database design

🀯 Common Confusion

Is redundant FD same as extraneous attribute?

❌ NO

πŸ‘‰ Extraneous Attribute β†’ remove part of FD
πŸ‘‰ Redundant FD β†’ remove whole dependency

⚑ Exam Trick

  • Remove one FD
  • Find closure
  • If still derivable β†’ remove it
πŸ‘‰ Always simplify FD set before solving questions

πŸ“Š GATE Question: Redundant Functional Dependencies

Given:

F = { X β†’ YZ, ZW β†’ P, P β†’ Z, W β†’ XPQ, XYQ β†’ YW, WQ β†’ YZ }

🎯 Goal

Find redundant functional dependencies.

βš™οΈ Step 1: Check X β†’ YZ

Remove it and compute X⁺:

X⁺ = {X}

Cannot derive Y or Z β†’ NOT redundant βœ…


βš™οΈ Step 2: Check ZW β†’ P

Remove it and compute (ZW)⁺:

ZW⁺ = {Z, W}

Apply W β†’ XPQ:

ZW⁺ = {Z, W, X, P, Q}

We can derive P β†’ ZW β†’ P is REDUNDANT ❌


βš™οΈ Step 3: Check P β†’ Z

Remove it and compute P⁺:

P⁺ = {P}

Cannot derive Z β†’ NOT redundant βœ…


βš™οΈ Step 4: Check W β†’ XPQ

No other FD gives XPQ β†’ NOT redundant βœ…


βš™οΈ Step 5: Check XYQ β†’ YW

Remove it and compute (XYQ)⁺:

XYQ⁺ = {X, Y, Q}

Apply X β†’ YZ:

XYQ⁺ = {X, Y, Q, Z}

Cannot derive W β†’ NOT redundant βœ…


βš™οΈ Step 6: Check WQ β†’ YZ

Remove it and compute (WQ)⁺:

WQ⁺ = {W, Q}

Apply dependencies:

  • W β†’ XPQ β†’ gives X, P, Q
  • P β†’ Z β†’ gives Z
  • X β†’ YZ β†’ gives Y and Z
WQ⁺ = {W, Q, X, P, Z, Y}

We can derive both Y and Z β†’ WQ β†’ YZ is REDUNDANT ❌


βœ… Final Answer

Redundant Functional Dependencies:

ZW β†’ P
WQ β†’ YZ

Final Reduced Set:

F = { X β†’ YZ, P β†’ Z, W β†’ XPQ, XYQ β†’ YW }
πŸ‘‰ Final Answer: Remove ZW β†’ P and WQ β†’ YZ

Extraneous Attribute in DBMS

An Extraneous Attribute is an attribute that is not required in a functional dependency. If removing an attribute does not change the meaning of the dependency, then it is called extraneous.

πŸ‘‰ If removing an attribute does NOT change the dependency β†’ it is Extraneous (Redundant)

In simple words, extraneous attributes are unnecessary parts of a functional dependency. Removing them helps simplify the database design and is an important step in Minimal Cover and Normalization.

πŸ“Š Example

AB β†’ C
A β†’ C

πŸ” Analysis

πŸ‘‰ B is Extraneous (redundant attribute)

Types of Extraneous Attributes

1. Extraneous Attribute in Left Side (LHS)

An attribute in the left-hand side is extraneous if it can be removed and the dependency still holds.

AB β†’ C
A β†’ C

Since A alone determines C, B is extraneous.

A β†’ C

2. Extraneous Attribute in Right Side (RHS)

If multiple attributes exist on the right side, we check them individually.

A β†’ BC

Split into:

A β†’ B
A β†’ C

Then check if any dependency is unnecessary.

βš™οΈ How to Find Extraneous Attribute

πŸ‘‰ Attribute Closure is the key concept to detect extraneous attributes

πŸ“Š Deep Example (GATE Level)

AB β†’ C
A β†’ C
C β†’ D

Check AB β†’ C:

A⁺ = {A, C, D}

Since A alone determines C, B is extraneous.

A β†’ C
C β†’ D
πŸ‘‰ Reduced (Minimal) Functional Dependency Set

πŸ’£ Why Extraneous Attribute is Important?

🀯 Common Confusion

Does removing an attribute always change dependency?

❌ NO

πŸ‘‰ If dependency still holds β†’ attribute was unnecessary

⚑ Exam Trick

πŸ‘‰ Always simplify before solving questions

πŸ“Š GATE Question: Extraneous Attributes

Given Functional Dependencies:

F = { X β†’ Z, XY β†’ WP, XY β†’ ZWQ, XZ β†’ R }

🎯 Goal

Identify extraneous attributes and simplify the functional dependencies.

1. X β†’ Z

Single attribute on LHS β†’ nothing to remove βœ…

βš™οΈ Step 1: Check XY β†’ WP

Check if X is extraneous:

Remove X β†’ check Y⁺

Y⁺ = {Y}

Y cannot determine W or P β†’ X is NOT extraneous ❌

Check if Y is extraneous:

Remove Y β†’ check X⁺

X⁺ = {X, Z, R}

X cannot determine W or P β†’ Y is NOT extraneous ❌

πŸ‘‰ XY β†’ WP is already minimal βœ…

βš™οΈ Step 2: Check XY β†’ ZWQ

Split RHS:

XY β†’ Z
XY β†’ W
XY β†’ Q

Check XY β†’ Z:

Since X β†’ Z already exists

πŸ‘‰ Z is redundant on RHS ❌


Check XY β†’ W:

From XY β†’ WP, we already get W

πŸ‘‰ W is redundant ❌


Check XY β†’ Q:

No other FD gives Q β†’ keep it βœ…

πŸ‘‰ Reduced: XY β†’ Q

βš™οΈ Step 3: Check XZ β†’ R

Check if Z is extraneous:

Remove Z β†’ check X⁺

X⁺ = {X, Z, R}

Since X already gives R β†’ Z is extraneous ❌

X β†’ R

βš™οΈ Step 4: Final Simplification

Remaining dependencies:

X β†’ Z
XY β†’ WP
XY β†’ Q
X β†’ R

βœ… Final Answer

Extraneous removed:

πŸ‘‰ Final Minimal Set:

X β†’ Z, XY β†’ WP, XY β†’ Q, X β†’ R

Difference Between Extraneous Attribute and Redundant FD

Extraneous Attribute Redundant FD
Removes part of FD Removes whole FD
Used in canonical cover Used in simplification
Check attribute removal Check FD derivation

πŸš€ Continue Learning

Move to the next topic: Canonical Cover

πŸ‘‰ Next Topic: Canonical Cover β†’

πŸ”— Related Topics