How to write functional dependencies

Dependencies

In order to understand the transformation of the relations into the three normal forms, we must first introduce the concept of the dependencies between attributes of these relations.

Functional dependency:
Attribute B of an object type G is functionally dependent on attribute A if at most one value of B can occur for each value of A.
G.A -> G.B

Example:

ID Surname
S1 Meier
S2 Weber

The name attribute is functionally dependent on the ID attribute (ID -> Name).

Identification key:
An attribute A for which applies: Every attribute of G is functionally dependent on A; no attribute of A is functionally dependent on the other A-attributes.
G.A -> G.B

Example:

ID Surname First name
S1 Meier Hans
S2 Weber Ueli

The ID attribute is the identification key.

Full functional dependency:
A is the identification key of an object type G, B is an attribute; B is fully functionally dependent on A if and only if B is functionally dependent on A, but not already on parts of A.
G.A ==> G.B

Example:

ID student Surname ID professor grade
S1 Meier P2 5
S2 Weber P1 6

The “Grade” attribute is fully functionally dependent on the “IDStudent” and “IDProffesor” attributes (“IDSt, IDProf ==> Grade”).

Transitive dependency:
A is the identification key of an object type G, B and C are further attributes, all different / disjoint from one another; C is transitively dependent on A if:
G.A -> G.B; G.B -> G.C; G.B - / -> G.A

Example:

ID Surname Account number Bank_Clearing_Nr Bank
L1 Meier 1234-5 836 UBS
L2 Weber 5432-1 835 CS

The functional dependency with regard to “Bank_Clearing_Nr -> Bank” is a transitive dependency, since “Bank_Clearing_Nr” is not the primary key of the relation.