Minggu, 03 Mei 2009

Normalization: An Exercise


Is given by the following ERD :






















Normalization from ERD of above :

Mapping of ER Diagram above is :

Normaslisasi 1NF






Above field got from attribute in entitas of except field of KONTROLPEG and PIMPINAN. This Field is got from relationship 1:1 from entitas PEGAWAI and from entitas officer to entitas BAGIAN.

Functional Dependency from attribute of where sign bow its meaning that attribute showed by arrow sign, its value is depended from attribute showing, the example of at FD1 attribute showing is NOPEG so that all the attribute value depend on NOPEG. Where a officer control a lot of officer and a officer is only controlled by a just just officer. A officer can lead the shares and part of is only led by a just just officer.

From form 1NF above and by Functional is Dependency that happened is hence got by a second Normalization form 2NF

(NOPEG, NAPEG, ALM1, KDPOS, TGLLAH, UMUR,NOBAG, NOPEG) -> Pegawai Table

(NOBAG, NABAG, LOKASI, NOPEG) -> Bagian Table

(NOPEG, NOPRO, JAM) -> Kerja Table

(NOPRO, NAPRO, LOKPRO, NOBAG) -> Proyek Table

(NOPEG, NAMA, JNKELT, HUBUNGAN) -> Tanggungan Table












Table PEGAWAI have NOPEG as primary key, NOBAG and NOPEG as foreign key. NOBAG as the foreign key of this table because, according the ERD above, between PEGAWAI and BAGIAN have ANGGOTA relationship with many to one cardinality. So, primary key BAGIAN is become foreign key at table PEGAWAI. Table BAGIAN, have NOBAG as primary key, and NOPEG as foreign key. According to ERD above, between PEGAWAI and BAGIAN have PIMPIN relation with one to one cardinality. So, each other get foreign key from primary key each table. Table PROYEK have NOPRO as primary key, and NOBAG as foreign key. Table TANGGUNGAN have NOPEG as foreign key. As we see the ER above, TANGGUNGAN is weak entity, so, TANGGUNGAN have NOPEG as foreign key from table PEGAWAI. Table KERJA, is come from KERJA relation. As we see at the ER Diagram above, KERJA relation is many to many cardinality, so the relation KERJA is become a table, which have NOPEG and NOPRO as the foreign key

Form 3NF is equal to form 2NF because it is true when made to form 2NF entire all attribute of at tables only depend on one attribute of at the tables. This matter as according to loaded form 3NF that is in one tables of all attribute have to it depends on the one functioning attribute as primary key.

Tidak ada komentar:

Posting Komentar