I need closure on this. I fabricated a definition that partial dependency is when fields are indirectly dependent on the primary key or partially dependent but are also dependent on other keys that depend on the primary such that if the field which another field depends on id deleted that field will still exist due to its dependence on the primary key. I am not sure if it is correct. I have researched and every definition sounds misleading.Is my definition correct and if not please explain?
A FD (functional dependency) that holds in a relation is partial when removing one of the determining attributes gives a FD that holds in the relation. A FD that isn't partial is full.
Eg if {A,B} → {C} but also {A} → {C} then {C} is partially functionally dependent on {A,B}.
A functional dependency X → Y is a full functional dependency if removal of any attribute A from X means that the dependency does not hold any more; that is, for any attribute A ε X, (X – {A}) does not functionally determine Y. A functional dependency X → Y is a partial dependency if some attribute A ε X can be removed from X and the dependency still holds; that is, for some A ε X, (X – {A}) → Y.
-- FUNDAMENTALS OF Database Systems SIXTH EDITION Ramez Elmasri & Navathe
Notice that whether a FD is full vs partial doesn't depend on CKs (candidate keys), let alone one CK that you might be calling the PK (primary key).
(The definition of 2NF involves full functional dependence of non-CK attributes on CKs but any FD that holds is either full or partial. And PKs don't matter to 2NF either.)
Partial dependency means that a nonprime attribute is functionally dependent on part of a candidate key. (A nonprime attribute is an attribute that's not part of any candidate key.)
For example, let's start with R{ABCD}, and the functional dependencies AB->CD and A->C.
The only candidate key for R is AB. C and D are a nonprime attributes. C is functionally dependent on A. A is part of a candidate key. That's a partial dependency.
Partial dependency implies is a situation where a non-prime attribute(An attribute that does not form part of the determinant(Primary key/Candidate key)) is functionally dependent to a portion/part of a primary key/Candidate key.
Partial Dependency is one kind of functional dependency that occur when primary key must be candidate key and non prime attribute are depends on the subset/part of candidates key (more than one primary key).
Try to understand partial dependency relate through example :
Seller(Id, Product, Price)
Candidate Key : Id, Product
Non prime attribute : Price
Price attribute only depends on only Product attribute which is a subset of candidate key, Not the whole candidate key(Id, Product) key . It is called partial dependency.
So we can say that Product->Price is partial dependency.
Partial Functional Dependency occurs only in relation with composite keys. Partial functional dependency occurs when one or more non key attribute are depending on a part of the primary key.
Example:
Table: Stud_id, Course_id, Stud_name, Course_Name
Where: Primary Key = Stud_id + Course_id
Then: To determine name of student we use only Stud_id, which is part of primary key.
{Stud_id} -> {Stud_Name}
Hence,Stud_name is partially dependent on Stud_id. This is called partial dependency.
Partial dependence is solved for arriving to a relation in 2NF but 2NF is a "stepping stone" (C. Date) for solving any transitive dependency and arriving to a relation in 3NF (which is the operational target). However, the most interested thing on partial dependence is that it is a particular case of the own transitive dependency. This was demostrated by P. A. Berstein in 1976: IF {(x•y)→z but y→z} THEN {(x•y)→y & y→z}. The 3NF synthesizer algorithm of Berstein does not need doing distintions among these two type of relational defects.
I hope this explaination gives a more intuitive appeal to dependency than the answers previously given.
Functional Dependency
An analysis of dependency operates on the attribute level, i.e. one or more attribute is determined by another attribute, it comes before the concept of keys. 'The role of a key is based on the concept of determination. 'Determination is the state in which knowing the value of one attribute makes it possible to determine the value of another.' Database Systems 12ed
Functional dependency is when one or more attributes determine one or more attributes. For instance:
Social Security Number -> First Name, Last Name.
However, by definition of functional dependency:
(SSN, First Name) -> Last Name
This is also a valid functional dependency. The determinants (The attribute that which determines another attribution) are called super key.
Full Functional Dependency
Thus, as a subset of functional dependency, there is the concept of full functional dependency, where the bare minimal determinant is considered. We refer those bare minimal determinants collectively as one candidate key (weird linguistic quirk in my opinion, like the concept of vector).
Partial Functional Dependency
However, sometimes one of the attributes in the candidate key is sufficient to determine another attribute(s), BUT not all, in a relation (a table with no rows). That, is when you have a partial functional dependency within a relation.
来源:https://stackoverflow.com/questions/25747802/partial-dependencydatabases