Minggu, 03 Mei 2009

Normalization : An Exercise

I have task, that is to normalize the ER-Diagram below and normalized it.


From the ERD above, we can see some mistakes :
  1. There’s no cardinality between entity BAGIAN and PROYEK.
  2. The ternary relationship between entity PEGAWAI, PROYEK, & TANGGUNGAN.

And, I try to fixed the ER Diagram. The result is like below :

Explanation about ERD above, I fixed :
  1. Give cardinality at PUNYA relation. It should have been 1-N from BAGIAN to PROYEK. It cardinality is 1-N because of that one BAGIAN may have many PROYEK, and one PROYEK may only have one BAGIAN.
  2. I will delete the ternary relationship between entity PEGAWAI, TANGGUNGAN and change them only with binary relationship. It’s legitimate if entity PEGAWAI has a relationship with TANGGUNGAN (TANGGUNGAN will be the weak entity because it’s Dependant with the existence of the PEGAWAI). But it’s also has a relation with PROYEK, and supported with the existence of relation between PEGAWAI an PROYEK.

Then, I try to make the mapping diagram from the fixed ERD above. And the result is like below :


After that, I try to make the normalization of the mapping above. The result is like below :

1. normalization of table PEGAWAI

2. normalization of table BAGIAN

3. normalization of table PROYEK

For the normalization above, each entity has relation with the primary key, and there is no entity that does not have a relationship with a primary key, it can be said normalisai level 3NF normalization

For table TANGGUNGAN and KERJA, it don't need to be normalization because they don't have a primary key.

references:
1. Agus Sanjaya ER, S.Kom, M.Kom, slide presentation : Normalisasi

0 komentar:

Posting Komentar