Basis Data2nd Meeting
Normalization Normalization is a process for evaluating
and correcting table structures to minimize data redundancies, thereby helping to eliminate data anomalies. It helps us evaluate table structures and produce good tables.
Resiko?
Normalization
NormalizationUNF
A table that contains one or more repeating groups.Repeating Group
an attribute or group of attributes within a table that occurs with multiple values for a single occurrence of the nominated key attributes of that table
Normalization (1NF)Eliminate Repeating Groups
Normalization (1NF)Identify Primary Keys
REF ID NAMA JUDUL SEWA HARI
TGL_PINJ TGL_KBL
Normalization (1NF)Identify Dependencies
Partial dependencies. Dependencies based on only a part of a composite primary key.
Transitive dependencies. Dependency of one nonprime attribute on another nonprime attribute
REF ID NAMA JUDUL SEWA HARI
TGL_PINJ TGL_KBL
transitive
partial
partial
Normalization (1NF)Satisfying Condition
All the key attributes are defined.There are no repeating groups in the table.All attributes are dependent on the primary
key.
Normalization (2NF)
Eliminate all partial dependenciesREFIDREF ID
REF ID NAMA JUDUL SEWA HARI
TGL_PINJ TGL_KBL
transitive
partial
partial
Normalization (2NF)Identify dependents attributes
JUDUL, SEWA, HARI, TGL_PINJ, TGL_KEMBALI depends on REF
NAMA depends on ID
ID NAMA
REF ID
REF JUDUL SEWA HARI
TGL_PINJ TGL_KBL
No Partial Dependencies
Normalization (BCNF)Remove all transitive dependencies
transitive
REF JUDUL SEWA HARI
TGL_PINJ TGL_KBL
ID_JUDUL
JUDUL
SEWA
REF TGL_PINJ
REF ID_JUDUL HARI TGL_KBL
Normalization (BCNF)Final
ID NAMA
REF ID
ID_JUDUL
JUDUL
SEWA
REF TGL_PINJ
REF ID_JUDUL HARI TGL_KBL
No Transitive Dependencies
Improving DesignSince REF and REF are one-to-one
ID NAMA
REF ID TGL_PINJ
ID_JUDUL
JUDUL
SEWA
REF ID_JUDUL HARI TGL_KBL
Normalization (3NF)
ID_JUDUL
REF
ID_JUDUL
ID REF TGL_PINJ
REF ID TGL_PINJ
Normalization (3NF to BCNF)
Each CLASS_CODE identifies a class uniquely.
A student can take many classes.A staff member can teach many classes, but each class is
taught by only one staff member.
Normalization (3NF to BCNF)
Normalization (3NF to BCNF)
Tugas (gunakan tahapan dalam normalisasi)1 client ditangangi 1 mekanik.Bengkel memiliki beberapa macam jasa servis
dengan biaya berbeda-beda.Servis bisa saja memerlukan penggantian/pembelian
barang yang memiliki harga tertentu.Selain servis, bengkel ini juga menjual barang
secara terpisah.