Data Control Language dan Teknik Normalisasi
Berikan contoh normalisasi pada kasus lain.
Contoh Normalisasi pada Kasus Lain
Id_mhsw | nama | tgl_lhr | matakuliah | Id_matakuliah | kredit | grade | berat |
8183 | Ryan | 14/03/1991 | Math | MAT231 | 3 | B | 3 |
8183 | Ryan | 14/03/1991 | Economic | ECO220 | 3 | A | 4 |
8183 | Ryan | 14/03/1991 | History | HST211 | 2 | B | 3 |
8184 | Ilma | 18/05/1990 | History | HST21 | 2 | A | 4 |
8185 | Raga | 11/11/1990 | English | ENG202 | 2 | C | 2 |
8185 | Raga | 11/11/1990 | Math | MAT231 | 3 | B | 3 |
8186 | Sukma | 12/01/1991 | Math | MAT231 | 3 | B | 3 |
8186 | Sukma | 12/01/1991 | English | ENG202 | 2 | C | 2 |
Dari tabel data yang dihasilkan pada perancangan basis data, lakukanlah normalisasi pada tabel-tabel tersebut sampai bentuk normal ketiga !
Bentuk Normalisasi 1
Suatu relasi memenuhi 1NF jika dan hanya jika setiap atribut dari relasi tersebut hanya memiliki nilai tunggal dalam satu baris atau record.
Id_mhsw | nama | Id_matakuliah |
8183 | Ryan | MAT231 |
8183 | Ryan | ECO220 |
8183 | Ryan | HST211 |
8184 | Ilma | HST21 |
8185 | Raga | ENG202 |
8185 | Raga | MAT231 |
8186 | Sukma | MAT231 |
8186 | Sukma | ENG202 |
Id_mhsw | nama | tgl_lhr | matakuliah | Id_matakuliah | kredit | grade | berat |
8183 | Ryan | 14/03/1991 | Math | MAT231 | 3 | B | 3 |
8183 | Ryan | 14/03/1991 | Economic | ECO220 | 3 | A | 4 |
8183 | Ryan | 14/03/1991 | History | HST211 | 2 | B | 3 |
8184 | Ilma | 18/05/1990 | History | HST21 | 2 | A | 4 |
8185 | Raga | 11/11/1990 | English | ENG202 | 2 | C | 2 |
8185 | Raga | 11/11/1990 | Math | MAT231 | 3 | B | 3 |
8186 | Sukma | 12/01/1991 | Math | MAT231 | 3 | B | 3 |
8186 | Sukma | 12/01/1991 | English | ENG202 | 2 | C | 2 |
Bentuk Normalisasi 2
Id_mhsw | nama | tgl_lhr |
8183 | Ryan | 14/03/1991 |
8184 | Ilma | 18/05/1990 |
8185 | Raga | 11/11/1990 |
8186 | Sukma | 12/01/1991 |
Id_matakuliah | matakuliah | kredit |
MAT231 | Math | 3 |
ECO220 | Economic | 3 |
HST211 | History | 2 |
ENG202 | English | 2 |
Id_mhsw | Id_matakuliah | matakuliah | grade | berat |
8183 | MAT231 | Math | B | 3 |
8183 | ECO220 | Economic | A | 4 |
8183 | HST211 | History | B | 3 |
8184 | HST21 | History | A | 4 |
8185 | ENG202 | English | C | 2 |
8185 | MAT231 | Math | B | 3 |
8186 | MAT231 | Math | B | 3 |
8186 | ENG202 | English | C | 2 |
3.
Bentuk Normalisasi 3 Id_mhsw | nama | tgl_lhr |
8183 | Ryan | 14/03/1991 |
8184 | Ilma | 18/05/1990 |
8185 | Raga | 11/11/1990 |
8186 | Sukma | 12/01/1991 |
Id_matakuliah | matakuliah | kredit |
MAT231 | Math | 3 |
ECO220 | Economic | 3 |
HST211 | History | 2 |
ENG202 | English | 2 |
Id_mhsw | Id_matakuliah | matakuliah | grade |
8183 | MAT231 | Math | B |
8183 | ECO220 | Economic | A |
8183 | HST211 | History | B |
8184 | HST21 | History | A |
8185 | ENG202 | English | C |
8185 | MAT231 | Math | B |
8186 | MAT231 | Math | B |
8186 | ENG202 | English | C |
grade | berat |
A | 4 |
B | 3 |
C | 2 |
D | 1 |
E | 0 |
0 komentar:
Posting Komentar