Minggu, 03 Mei 2009

Normalization: An Exercise

In this time, I have given a description of ERD in subjects ADSI. But I see some gaffe in ERD . Here is the ERD :

from the picture above, we can see 2 awkwardness that is:
1. no cardinality between PART and PROJECT
2. Ternary relation between TANGGUNGAN and PROJECT
On the ERD that can be changed according to the business process logic. I ERD can be improved as below:

I add 1-N cardinality in relationships and PROJECT and BAGIAN because:
- 1 BAGIAN can handle a lot of PROJECT and,
- Many PROJECT can be handled by 1 BAGIAN
The goal of fix ERD is doing so at the mapping tables from ERD, the results from the mapping table as much as possible into the form of 2NF or 3NF if the mapping is done correctly.
Therefore, it is then there are rules that I use during the mapping. Rules are:
1. If the relation 1-N in the primary key (1) move to (N) and vice versa applies.
2. If the relationship M-N will be created a new table with the primary key of each entity will be became the primary key in the new table.
3. If the relationship 1-1 then choose higher cardinality to put primary key for a foreign key in relation table .
4. If the dependent relationships of the primary key table dependent primay key derived from the mother entity.
So from that rules, i struggle to mapping that ERD, here isi the tables :





Fro that mapping above, we can see that tables created from mapping have meet 3NF normalization. Because the relation should not have a non key attribute functionally determined by another non key attribute ( or by a set of non key attributes). That is, there should be no transitive dependency of a non key primary key.