Partial Dependency(Databases)

前端 未结 9 1199
时光说笑
时光说笑 2020-11-29 01:19

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 dep

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 01:53

    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.

提交回复
热议问题