Sunday, February 11, 2018

Find the redundant extraneous attributes

Find the redundant (extraneous) attributes from the set of functional dependencies


Question:

Consider the relation STUDENT with the schema STUDENT(RegNo, Name, DOB, Age, Dept, Course, Semester, Grade) and set of functional dependencies F = {RegNo Name, RegNo DOB, RegNo DOB Age, RegNo Dept, RegNo Dept Course Semester Grade}. Find the attributes that are redundant in the given set F of functional dependencies.

Solution:

What is redundant attribute?
An attribute in the left hand side (LHS) of a functional dependency, especially if more than one attribute present in the LHS, is said to be a redundant (extraneous) attribute if the RHS attribute(s) can be determined with the help of other LHS attributes.

How to identify a redundant attribute?
If the RHS of the said functional dependency can be derived without one of the attributes on the LHS, using the other FDs of that relation, then that particular attribute is said to be redundant. For example, in AB → C the attribute B is redundant if closure of A can determine C.

Let us solve the given question;

We don’t need to check for redundant attributes in a FD (functional dependency) where the LHS attribute is only one. Hence, we can omit the following FDs.
RegNo Name,
RegNo DOB,
RegNo Dept,

(i) Now let us take the FD RegNo DOB → Age. To check either of the LHS attributes are redundant, we have to use the other attribute to derive the RHS.

Is DOB redundant?
To check, we have to find the closure of the other attributes. In this FD, RegNo is the only other attribute. Hence let us find the closure of RegNo.

(RegNo)+ = RegNo, Name, DOB, Dept, Age.

Observe from the closure that the attribute Age is part of the closure. Hence, DOB is redundant attribute. So we can remove DOB from RegNo DOB Age results in the FD RegNo → Age.

Now our F becomes { RegNo → Name, RegNo → DOB, RegNo → Age, RegNo → Dept, RegNo Dept Course Semester → Grade}

(ii) Now let us take the last FD RegNo Dept Course Semester → Grade.

Is Dept redundant?
(RegNo Course Semester)+ = RegNo, Name, DOB, Dept, Age, Course, Semester, Grade.

Result includes Grade. So attribute Dept is redundant and can be removed.
Now our F becomes { RegNo → Name, RegNo → DOB, RegNo → Age, RegNo → Dept, RegNo Course Semester → Grade}

(iii) Let us take the last FD given above, RegNo Course Semester → Grade.

Is Course redundant?
(RegNo Semester)+ = RegNo, Name, DOB, Age, Dept, Semester

The result does not include Grade. Hence, the attribute Course is not redundant. And our F does not change.

Is Semester redundant?
Find the closure of RegNo, Course.
(RegNo, Course)+ = RegNo, Name, DOB, Age, Dept, Course.

The result does not include Grade. Hence, the attribute Semester is not redundant. And our F does not change.

The final set of functional dependencies F is as follows;
F = { RegNo → Name, RegNo → DOB, RegNo → Age, RegNo → Dept, RegNo Course Semester → Grade}

***************


Go to - 1NF,    2NF,    3NF,    BCNF





Find the redundant attributes in a given functional dependency
How to remove redundant attributes
How to remove extraneous attributes
Find and remove redundant (extraneous) attributes
Normalize relational table by removing redundant attributes
How to eliminate extraneous attributes to find minimal cover


No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents