Chapter 6 ; Normalization

on Saturday, April 25, 2009

Normalization

A. Designing Database Process
1. To collected user / business need.
2. To expanded ER-model based of user / business need.
3. ER model to relation assembly.
4. Normalizatied relation for losed the anomaly.
5. Implementation to database by made table for every relation, which
have already normalization.


B. Database Normalization
1. Normalization is formation database structure until the most of
ambyguity can to losed.
2. Normalization stage is started from the most simple stage (1NF) until
the most tight.
3. Ussually, only in 3NF level or BCNF because that is enaugh for producing
the good tables.
4. Why we must do normalyzation ?
- Optimalisation table structured.
- Improving the velocity.
- To losed the same input data.
- It is more efficient in storage media usage.
- To lessen redundancy.
- To avoid anomaly (insertion anomalies, deletion anomalies, update anomalies)
- Integrity data, that is improvement.

C. Functional Dependency
1. Functional Dependency to figuring attribute connection in a relation.
2. A attribute is functionally dependant in other, if we used that attributes value for defined the other attributes value.
3. The symbol is "->" for represent the functional dependency.
4. Notation : A -> B
A and B are attribute from a table. The mean is with functional A defined B or B depends on A, if and only if there are 2 line data with the same value A, so value B is same.


Functional Dependency:
NRP -> Nama
Mata_Kuliah, NRP -> Nilai
Non Functional Dependency:
Mata_Kuliah -> NRP
NRP -> Nilai

5. Functional Dependency from table value :
- NRP -> Nama
Because for every value the same NRP, so the same value is same.
- {mata_kuliah,NRP} -> Nilai
Because attribute value depends on mata_kuliah and NRP together.
In the other mean for mata_kuliah and the same NRP, so the value is same, because mata_kuliah and NRP is key (unique).

D. 1NF (First Normal Form)
First normal form (1NF or Minimal Form) is a normal form used in database
normalization. A relational database table that adheres to 1NF is one that
meets a certain minimum set of criteria. These criteria are basically concerned
with ensuring that the table is a faithful representation of a relation and that it is free of repeating groups.
- Exp : Data of student :

Tables of above ineligibility 1NF.
- Decomposition become :
Tables of student :

Tables of hobby :


E. 2NF (Second Normal Form)
Second normal form (2NF) is a normal form used in database normalization. 2NF was
originally defined by E.F. Codd in 1971. A table that is in first normal form (1NF) must meet additional criteria if it is to qualify for second normal form. Specifically: a 1NF table is in 2NF if and only if, given any candidate key and any attribute that is not a constituent of a candidate key, the non-key attribute depends upon the whole of the candidate key rather than just a part of it.
In slightly more formal terms: a 1NF table is in 2NF if and only if none of its non-prime attributes are functionally dependent on a part (proper subset) of a candidate key. (A non-prime attribute is one that does not belong to any candidate key.)
Note that when a 1NF table has no composite candidate keys (candidate keys consisting
of more than one attribute), the table is automatically in 2NF.
Tables following fulfill 1NF, but do not the including 2NF.


F. 3NF (Third Normal Form)
Normal form 3NF fufilled if have fulfilled form 2NF, and otherwise there is attribute of is non key primary owning depended to attribute of is non the other key primary.
Tables of up to standard student following 2NF, but do not fulfill 3NF :


G. Boyce-Codd Normal Form (BNCF)
Boyce-Codd normal form (or BCNF) is a normal form used in database normalization.
It is a slightly stronger version of the third normal form (3NF). A table is in Boyce-Codd normal form if and only if, for every one of its non-trivial functional dependencies X → Y, X is a superkey—that is, X is either a candidate key or a superset thereof.

H. 4NF and 5NF
1. Relation in 4NF, if relation in BCNF and not dependence with many value. For losed the dependence with many value from one relation, we must divided the relation
become 2 new relation. That relation, contains 2 attribute . They have many value respetively.
2. Relation in 5NF with propertis, that is join without lossless join. 5NF referred as also PJNF (Projection join normal form). This case rarely appear and it is difficult to is detected with practical.

REF :
SLIDE PART 6 "NORMALISASI" NGURAH AGUS SANJAYA ER, S.KOM, M.KOM
http://en.wikipedia.org/wiki/1NF
http://en.wikipedia.org/wiki/2NF
http://en.wikipedia.org/wiki/3NF
http://en.wikipedia.org/wiki/BCNF

0 comments:

Post a Comment