|
|
In order to be able to normalise a relation according to the three normal forms, we must first understand the concept of dependency between attributes within a relation.
Example:
| ID | Name |
|---|---|
| S1 | Meier |
| S2 | Weber |
The attribute Name is functionally dependent of attribute ID (ID --> Name).
Beispiel:
| ID | Name | Surname |
|---|---|---|
| S1 | Meier | Hans |
| S2 | Weber | Ueli |
Attribute ID is the identification key
Beispiel:
| IDStudent | Name | IDProfessor | Grade |
|---|---|---|---|
| S1 | Meier | P2 | 5 |
| S2 | Weber | P1 | 6 |
The attribute Grade is fully functional dependent on the attributes IDStudent and IDProfessor.
Example:
| ID | Name | Konto_Nr | Bank_Code_No | Bank |
|---|---|---|---|---|
| L1 | Meier | 1234-5 | 836 | UBS |
| L2 | Weber | 5432-1 | 835 | CS |
There is a transitive dependency between Bank_Code_No and Bank because Bank_Code_No is not the primary key of the relation.