you are at >> normalization >>3rd normal form
3rd normal form
Relation (table) is at 3NF if :
- is at 2NF
- every attribute is functional dependent only from primary key, so there can't exist
any transitive dependencies
Example
name | surname | birthplace | district |
Emil | Zając | Pszczyna | pszczyński |
Zofia | Zima | Pszczyna | pszczyński |
Eulalia | Jańska | Szczebrzeszyn | zamojski |
table `people` before normalization
In the above table the district is only partially dependent on the primary key, which
is the name and surname. District name is functional dependent on the column with the
place of birth of the person. For this reason, the table is not in the third NF.
It should be noted here that there is redundancy
because of repeated names pszczyński district. This may be the cause of the anomalies,
because one can change the place of birth, but forget to change the name of the district.
name | surname | birthplace |
Emil | Zając | Pszczyna |
Zofia | Zima | Pszczyna |
Eulalia | Jańska | Szczebrzeszyn |
table `people` after normalization int 3NF
town | district |
Pszczyna | pszczyński |
Szczebrzeszyn | zamojski |
sub-relation `towns` after normalization
Standardization of table `people` to 3NF is to create additional table `towns`, which there will be kept
information about ditrict of each town.
[ wróć na górę strony ]