Explain about partial and fully functional dependency

DBMSDatabaseBig Data Analytics

If a non-key attribute(s) depends on a part of a candidate key then it is partial dependency, it is applicable where the primary key has multiple attributes. If a non-key attribute(s) depends on the entire candidate key, then it is full dependency.

Example 1

Let R(A,B,C) and AB=candidate key.

A-> C is a partial dependency (where C dependson a part of the candidate key).

AB->C is a full dependency (where c depends on the entire candidate key).

A Functional dependency X->Y is a partial dependency if,

  • X is a part of candidate key and
  • Y is a non-key attribute(s).

Example 2

R(ABCDE)

F: {AB->C, C->D, B->E }. Find partial dependency.

Solution

AB+ =ABCD C+= CD B+= BE

=>AB is the only candidate key.

=> key attributes =A,B and

=> non-key attributes = C,D,E.

Key attributes are also called prime attributes and non-key attributes are also called non-prime attributes.

AB->C is not a Partial dependency // it is full dependency.

C-> D is not a partial dependency //it is full dependency.

B-> E is a partial dependency, since B is a part of the candidate key and E is a non-key attribute.

Example 3

Consider another example which is given below −

StudentClass (CourseID, RollNoOfStudent, Score, StudentName, StudentAge);

The Candidate Key in the above relation is {CourseID, RollNoOfStudent}

The functional dependency is; {CourseID, RollNoOfStudent} —-> {Score}

Now, the score is fully dependent on course id and rollno of student ..

{RollNoOfStudent}--->{StudentName}

Now student name is a non primary attribute, and it depends only on a subset of candidate keys, not on whole.

raja
Published on 03-Jul-2021 09:41:04
Advertisements