Learn: In this article, we are going to discuss about the **functional dependency and attributes closure In Database management system** and check whether a functional dependency is valid or nor?

Submitted by Prerana Jain, on May 20, 2018

A relational Database management System (RDBMS) represents the database o a collection of relations/tables. **A functional dependency is a constraint between two sets of attributes in a relation. It is the property of semantics or meaning of attribute. Functional dependency is also a property of relational schema "R" and not a particular legal relation "r" of "R"**.

Now let us consider, a relational "a" schema "R" and let "x" and "y" be the two set of attributes, now there is a functional dependency from "x" to "y"

If, **t1[x] = t2[x]** then, **t1[y] = t2[y]**

**Here**, "x" is the determinant and "y" is the dependent or "x" determines "y".

- Some functional dependency is directly visible in relational model but some either set of dependencies also hold good which are not directly visible.
- The entire set of functional dependency is called as complete set.
- Therefore, we must know how to calculate closure set of functional dependencies before Normalization.
- A functional dependency from "A" to "B" is said to be trivial if "B" is a subset of "A".

**Example:** In the corresponding relation,

Tuple A Ct1 a1 c1 t2 a1 c1 t3 a2 c2 t3 a2 c2 t4 a3 c3 t5 a3 c2A → C holds ast1[A] = t2[A] then t1[C] = t2[C] t3[A] = t3[A] then t3[C] = t4[C] but, C → A does not holds as. t3[C] = t4[C] = t3[C] but t3[A] = t4[A] does not equal t5[A].

There are some steps to **find whether a functional dependency is valid or invalid**:

**Step 1)** Check if all the values of "A" are distinct than it is valid otherwise invalid.

**Step 2)** Check if all the values of the "B" are same than the functional dependency is also valid.

**Step 3)** Otherwise we have to find at least one value of "A" on which are having different values of "B" than the functional dependency is invalid.

The set "A*" is said to be the closure set of "A" if the set of attributes are functionally dependent on the attributes of "A"

**Reflexive rule:**A rule is said to be reflexive if B is a subset of a then A → B. This is called trivial functional dependency rule.**Augmentation rule:**A rule is said to be augmented if A → B then Ar → Br holds good.**Transitive rule:**A rule is said to be transitive if A → B, B → r then A → r.

These three rules are functionally complete and known as RAT rule or RAT axioms and also called Armstrong rule which means only theses rules are sufficient enough to find closure set.

**4) Union rule**

A rule is said to be union if A → B, B → r then A → Br also holds good.

**Decomposition rule:**A rule is said to be decomposed if A → Br, A → B then A → r.**Pseudo transitivity rule:**If A → B and BW → r then WA → r.

Are you a blogger? Join our Blogging forum.

Comments and Discussions

.resCodeAS1 { display: block; width: 320px; height: 50px; }
@media(min-width: 300px) { .resCodeAS1 { display: none; } }
@media(min-width: 480px) { .resCodeAS1 { display: none; } }
@media(min-width: 750px) { .resCodeAS1 { display: block; width: 336px; height: 280px; } }
(adsbygoogle = window.adsbygoogle || []).push({});

(adsbygoogle = window.adsbygoogle || []).push({});

(adsbygoogle = window.adsbygoogle || []).push({});

solved programs: » C » C++ » DS » Java » C# |

aptitude que. & ans.: » C » C++ » Java » DBMS |

interview que. & ans.: » C » Embedded C » Java » SEO » HR |

close Like other websites, this site uses cookies to deliver relevant ads based on your interest, by using our website, you acknowledge that you have read our privacy policy.