* Lorsqu’un schéma relationnel n’est pas en troisième forme normale, il doit être normalisé:
- On crée une table pour chaque DFD trouvée au sein des attributs n'appartenant pas à la clé.
Soit : $$R (\underline{A_1,...,A_m},B_1, ..., \color{red}{B_i},...,\color{red}{B_j},...,B_n)$$ avec : $$A_1, ..., A_m \stackrel{DFD}{\rightarrow} B_1, ...,\color{red}{B_i},...,B_{j-1},B_{j+1},...,B_n$$ $$\color{red}{B_i} \stackrel{DFD}{\rightarrow} \color{red}{B_j}$$ Alors : $$R_1 (\underline{A_1,...,A_m},B_1,...,\color{red}{B_i},...,B_{j-1},B_{j+1},...,B_n)$$ $$R_2 (\underline{\color{red}{B_i}},\color{red}{B_j})$$
Comme précédemment, il est important de conserver la clé primaire de la table initiale si elle permet d'associer les valeurs dispersées dans les tables.
Avant :
- Commande (num_commande, nom_f, adresse_f, composant, quantité)
- avec :
- num_commande → nom_f, composant, quantité
- nom_f → adresse_f
Après :
- Commande (num_commande, nom_f, composant, quantité)
- Client (nom_f, adresse_f)
L’attribut nom_f est maintenant clé primaire de la table Client et clé étrangère de la table Commande.
Previous : 3eme_forme_normale_3fn Up : 2.2.5 Normalisation d'un schéma