Minggu, 26 April 2009

Normalization

Normalization, at a high level, is generally defined as the elimination of redundancies from an entity.

Although this is an accurate definition, it does not fully convey the true impact of what normalization is trying to accomplish, and more important, what it means not to apply it to your model.

Before we explain this any further it is necessary to define the five’s forms of normalization. These forms are known as: 1st normal form, 2nd normal form, 3rd normal form, 4th normal form and 5th normal form. Normal form is typically abbreviated “NF.” Each normal form should be dependent on the completion of the previous form, therefore, normalization should be applied in order. Below are the rules that satisfy each normal form:

1st NF: No repeating elements or repeating groups
2nd NF: No partial dependencies on a concatenated key
3rd NF: No dependencies on non-key attributes

Why do normalization :

1. optimalizing of table structures
2. increasing speed
3. eliminating of the same input data
4. more efficient in using storage
5. decreasing redundancy
6. avoid anomaly (insertion anomalies, deletion anomalies, update anomalies).
7. increase data integrity


Functional Dependency

- described connection of attributes in a relation
- an attribute told as functionally dependant inother if we using attribute value for determine another attribute value
- symsbol that used is for deputizing functional dependency that read as functional to determine.
- notation : A -> B

A and B is attribute from a table. its means as functional A determine B or B depended in A, if and as if there are 2 row data with same A value, so B value can be same.
- notation : A-/>B or Ax->B
- it is reverse from previously notation.


First Normal Form - 1NF

A table on the form said to be normal if I did not reside in the unnormalized form of a table, where there is a kind of field multiplication and field that allows a null (empty)
Not the allowed:
-Many attributes of value (Multivalued attributes).
-Attributes composite or a combination of both.

So:

-Price is the domain attribute must be atomic rates


Second Normal Form - 2NF

-Normal form 2NF met in a table if it meets the form of 1NF, and all the attributes than the primary key, have a full Functional Dependency on primary key
-A table does not meet 2NF, if there are attributes(Functional Dependency) are only partial (only depending on the part of the primary key)
-If there are attributes that have no dependence on the primary key, then the attributes must be moved or removed
-Functional dependency X -> Y is full if it is said to delete an attribute A from X means that Y is no longer dependent functional.
-Functional dependency X -> Y said if deleting a partial attribute A from X means that Y is functionally dependent.
-Relation scheme R in the form 2NF if every non-primary key attribute A E R depend on the full primary key fungsioanl R.


Third Normal Form - 3NF

Normal form 3NF fulfilled if the form meets 2NF, and if there are no non-primary key attribute that has a dependence on non-primary key attributes of the other (transitive dependencies).



Boyce-Codd Normal Form (BNCF)


-Boyce-Codd Normal Form constraint has a stronger form of the Normal third. To be BNCF, relations must be in the form of Normal Kesatu and forced each of the attributes depends on the function in the super key attributes.
-In the example below there is a relationship seminar, is the Primary Key NPM + Seminar.

Students may take one or two seminars. Each seminar requires 2 each of the students and led by one of the 2 seminar. Each leader can only take one seminar course. NPM in this example and show a Seminar lecture.


Normal form of the fourth and fifth

-Relations in the fourth normal form (NF 4) if the relation in BCNF and dependency tdak contain many values. To remove the dependency of many values from a relation, we divide the relationship into two new relations. Each relation contains two attributes that have a lot of relationship value.

-Relations in fifth normal form (5NF) deal with the property called the join without any loss of information (lossless join). Fifth normal form (also called the 5 NF PJNF (projection join normal form). The case is very rare and appear difficult to detect in practice.

Tidak ada komentar:

Posting Komentar