• Gathering user needs / business
• Develop the ER model based on user needs / business
• Convert ER Model to set the relation (table)
• Normalization relations, to remove anomalies
• to implement the database for each table to create relationships that have been in the normalization
DATABASE NORMALIZATION
• Normalization process is the establishment of the database structure so that most of the ambiguity can be removed.
• The normalization stage starting from the light (1NF) to most stringent (5NF)
• Usually only up to the level of 3NF or BCNF because already sufficient to generate the table-a table of good quality.
• Why do normalization?
Optimization table structures, Increase the speed, Eliminate income data the same, More efficient use of storage media, Reduce redundancy, Avoiding anomalies (insertion anomalies, deletion anomalies, update anomalies), Improved data integrity
• A table said good (efficient) or if the normal 3 to meet the following criteria:
• If there is decomposition (decomposition) table, it must be guaranteed safe described (Lossless-Join Decomposition). That is, after the table is described a new table-table, the table-table can generate a new table with the same exact.
• Maintain the functional dependence on the change data (Dependency preservation).
• Not violate Boyce-Code Normal Form (BCNF)
• If the three criteria (BCNF) can not be met, then at least the table does not violate the Normal Form of the third stage (3rd Normal Form / 3NF)
FUNCTIONAL DEPENDENCY
• Functional Dependency attributes describe the relationship in a relationship
• An attribute said functionally dependent on the other, if we use the value attribute to determine the value of the other attributes.
• Symbols used are --> to represent the functional dependency. --> reads determine the functional
• Notation: A-->B
• A and B are attributes of a table. A means of determining the functional B or B depends on A, if and only if there are 2 rows of data with the same value of A, then B is also the same value
• Notation: A -/-> B or A x --> B
It is the opposite of the previous notation.
• Example:

Functional Dependency:
NRP --> Nama
Mata_Kuliah, NRP --> Nilai
Non Functional Dependency:
Mata_Kuliah--> NRP
NRP --> Milai
• Functional Dependency of the table value
Nrp --> Nama
Because for each value Nrp the same, then the value of the same name
(TMata_Kuliah, NRP) --> Nilai
Because the value of attributes depending on the study eye and NRP together. In another sense for the university and The NRP is the same, then the same value, because lecture The NRP is the key, and (is unique).
Mata_Kuliah -/-> NRP
NRP -/-> Nilai
FIRST NORMAL FORM - 1NF
A table on the form said to be normal if I did not reside in the un normalized form of a table, where there is a kind of field multiplication and field that allows a null (empty)
Not the allowed:
• Attribute values, many (Multi valued attributes).
• Attribute a composite or a combination of both.
So:
• Price is the domain attribute must be atomic rates
Eg Student Data as follows:

Or
•Table-the table above does not meet the requirements 1NF
Decomposition becomes:
• Student Table:

• Table Hobbies:

SECOND NORMAL FORM - 2NF
• The form of normal 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 that dependence (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 dependence X-->Y if it is said of a remove attribute A from X means that Y is no longer dependent functional.
• Functional dependence X-->Y if it is said partial delete an attribute A from X means that Y is functionally dependent.
• The scheme in the form of the relation R 2NF if every non-primary key attribute A ÎR depend on the full primary key functional R.
• Example
The following table meet 1NF, 2NF, including but not

o Not fulfill 2NF, because (NIM, KodeMK) is regarded as the primary key:
NamaMhs -->(NIM, KodeMk)
Alamat-->(NIM, KodeMk)
Matakuliah-->(NIM, KodeMk)
SKS-->(NIM, KodeMk)
NilaiHuruf-->(NIM, KodeMk)
o Table in the decomposition should be some tables that are eligible 2NF
o Functional dependency as follows:
NilaiHuruf (fd1)-->(NIM, KodeMk)
(NamaMhs , Alamat) (fd2)-->NIM
(Matakuliah, SKS) (fd3)-->KodeMk
o So:
Value Table-->fd1 (NIM, KodeMk, NilaiHuruf)
Table Student-->fd2 (NIM, NamaMhs , Alamat)
Table Course-->fd3 (KoeMk, Matakuliah, SKS)
THIRD NORMAL FORM - 3NF
Third NORMAL FORM - 3NFBentuk normal 3NF met 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).
Example:
• Table the following students qualified 2NF, 3NF, but does not meet
• Because there are non-primary key attribute (namely, City and Provincial), which has a dependence on non-primary key attributes of (City, Province)the other (namely Poscode): Poscode
• So that the table should be in the decomposition:
• Students (NIM, NameofStudent, Road, Poscode)
o Poscode (Poscode, Province, City)
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 onity 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. This is a sample:

Relations Seminar is a form of Third Normal, but not BCNF
Seminar Code because the function depends on the guide, if any guide can only teach a seminar. Seminar depend on one key attribute is not as super in terms of by BCNF. So
Seminar relations must be parsed into two namely:

NORMAL FORM FOURTH AND FIFTH
• Relations in fourth normal form (NF 4) if the relation in BCNF and dependency not 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