NORMALISASI | Ex. to 3NF

Posted on
Normalisasi

Form untuk pasien seperti di bawah ini :

1. Identifikasi dependensi fungsional atribut-atribut pada formulir
patientNo → fullName
wardNo → wardName
drugNo → name, description, dosage, methodOfAdmin
patientNo, drugNo, startDate → unitsPerDay, finishDate

2. Normalisasi
– SatuNF (1NF)
tabelPasien Rawat Inap dan Obat: patientNo, drugNo, startDate, fullName, wardNo, wardName, bedNo, name, description, dosage, methodOfAdmin, unitsPerDay, finishDate
Tabel Pasient Rawat Inap dan Obat
patientNo
fullName
bedNo
wardNo
wardName
drugNo
name
description
dosage
methodOfAdmin
unitPerDay
startDate
finishDate
P10034
Robert MacDonald
84
Ward 11
Orthopaedic
10223
Morphine
Pain Killer
10mg/ml
Oral
50
24/03/04
24/04/05
P10034
Robert MacDonald
84
Ward 11
Orthopaedic
10334
Tetracyclene
Antibiotic
0.5mg/ml
IV
10
24/03/04
17/04/04
P10034
Robert MacDonald
84
Ward 11
Orthopaedic
10223
MOrphine
Pain Killer
10mg/ml
Oral
10
25/04/05
02/05/06
– DuaNF (2NF)
Tabel Rawat Inap: patientNo, drugNo, startDate, wardNo, wardName, bedNo, unitsPerDay, finishDate
TabelRawatInap
patientNo
bedNo
wardNo
wardName
drugNo
unitPerDay
startDate
finishDate
P10034
84
Ward 11
Orthopaedic
10223
50
24/03/04
24/04/05
P10034
84
Ward 11
Orthopaedic
10334
10
24/03/04
17/04/04
P10034
84
Ward 11
Orthopaedic
10223
10
25/04/05
02/05/06
TabelObat: drugNo, name, description, dosage, methodOfAdmin
TabelObat
drugNo
name
description
dosage
methodOfAdmin
10223
Morphine
Pain Killer
10mg/ml
Oral
10334
Tetracyclene
Antibiotic
0.5mg/ml
IV
10223
MOrphine
Pain Killer
10mg/ml
Oral
TabelPasien: patientNo, fullName
TabelPasien
patientNo
fullName
P10034
Robert MacDonald
– TigaNF (3NF)
Tabel Rawat Inap: patientNo, drugNo, startDate, wardNo, bedNo, unitsPerDay, finishDate
TabelRawatInap
patientNo
bedNo
wardNo
drugNo
unitPerDay
startDate
finishDate
P10034
84
Ward 11
10223
50
24/03/04
24/04/05
P10034
84
Ward 11
10334
10
24/03/04
17/04/04
P10034
84
Ward 11
10223
10
25/04/05
02/05/06
TabelObat: drugNo, name, description, dosage, methodOfAdmin
TabelObat
drugNo
name
description
dosage
methodOfAdmin
10223
Morphine
Pain Killer
10mg/ml
Oral
10334
Tetracyclene
Antibiotic
0.5mg/ml
IV
TabelPasien: patientNo, fullName
TabelPasien
patientNo
fullName
P10034
Robert MacDonald
TabelRuangan: ward No, wardName
TabelRuangan
wardNo
wardName
Ward 11
Orthopaedic
3. Kunci primer dan tamu di setiap tabel (3NF)
Jika dilihat ke tabel-tabel diatas(pada jawaban no 2), maka kunci primer terlihat dengan tanda bergaris bawah, yaitu:
tabelRawatInap: patientNo, drugNo, startDate, wardNo, bedNo, unitsPerDay, finishDate
→ Kunci Tamu: patientNo(FK), drugN(FK), wardNo(FK)
tabelObat: drugNo, name, description, dosage, methodOfAdmin
tabelPasien: patientNo, fullName

tabelRuangan: ward No, wardName