Partial Dependency in DBMS


What is Partial Dependency?

Partial Dependency occurs when a non-prime attribute is functionally dependent on part of a candidate key.

The 2nd Normal Form (2NF) eliminates the Partial Dependency.

Let us see an example −

Example

<StudentProject>

StudentIDProjectNoStudentNameProjectName
S01199KatieGeo Location
S02120OllieCluster Exploration

In the above table, we have partial dependency; let us see how −

The prime key attributes are StudentID and ProjectNo, and

StudentID =  Unique ID of the studentStudentName = Name of the studentProjectNo = Unique ID of the projectProjectName = Name of the project

As stated, the non-prime attributes i.e. StudentName and ProjectName should be functionally dependent on part of a candidate key, to be Partial Dependent.

The StudentName can be determined by StudentID, which makes the relation Partial Dependent.

The ProjectName can be determined by ProjectNo, which makes the relation Partial Dependent.

Therefore, the <StudentProject> relation violates the 2NF in Normalization and is considered a bad database design.

To remove Partial Dependency and violation on 2NF, decompose the tables −

<StudentInfo>

StudentIDProjectNoStudentName
S01199Katie
S02120Ollie

<ProjectInfo>

ProjectNoProjectName
199Geo Location
120Cluster Exploration

Now the relation is in 2nd Normal form of Database Normalization.

Updated on: 06-Sep-2023

42K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements