Perancangan Basis Data Understanding Normalization
Establishing a Business Model What Is Normalization? 1st Normal Form (1NF) 2nd Normal Form (2NF) 3rd Normal Form (3NF) Beyond 3rd Normal Form (3NF) 26/04/2018
What Is Normalization? 26/04/2018
What Is Normalization? In general, normalization removes duplication and minimizes redundant of data. The problem with the academic approach to normalization is that it seems to insist on always expecting a designer to apply every Normal Form layer in every situation 26/04/2018
The Concept of Anomalies Insert anomaly Caused when a record is added to a detail table, with no related record existing in a master table. tabel_jurusan tabel_fakultas kode_fakultas nama_fakultas FAK01 Teknik FAK02 Ekonomi kode_jurusan nama_jurusan kode_fakultas JUR01 Sistem Informasi FAK01 JUR02 Teknik Informatika JUR03 Akuntansi FAK02 Insert JUR04 Ilmu Komunikasi FAK03 26/04/2018
The Concept of Anomalies Delete anomaly Caused when a record is deleted from a master table, without first deleting all sibling records, in a detail table. tabel_jurusan tabel_fakultas kode_fakultas nama_fakultas FAK01 Teknik FAK02 Ekonomi kode_jurusan nama_jurusan kode_fakultas JUR01 Sistem Informasi FAK01 JUR02 Teknik Informatika JUR03 Akuntansi FAK02 ? 26/04/2018
Dependency, Determinants, and Other Jargon Functional dependency Y is functionally dependent on X if the value of Y is determined by X. Determinants The determinant in the description of functional dependency in the previous point is X because X determines the value Y, at least partially because 1 is added to X as well. tabel_fakultas kode_fakultas nama_fakultas FAK01 Teknik FAK02 Ekonomi FAK01 Determines that the faculty name is Teknik Ekonomi is dependant on the code being FAK02 26/04/2018
Dependency, Determinants, and Other Jargon Transitive dependency Z is transitively dependent on X when X determines Y and Y determines Z. Transitive dependence thus describes that Z is indirectly dependent on X through its relationship with Y. Contoh : nim - > kode_jurusan kode_jurusan -> kode_fakultas Transitive : nim - > kode_fakultas nim kode_jurusan kode_fakultas 10510202 05 1 10910760 09 20210121 02 2 26/04/2018
Dependency, Determinants, and Other Jargon Full Functional dependency This situation occurs where X determines Y, but X combined with Z does not determine Y. In other words, Y depends on X and X alone. If Y depends on X with anything else, there is not full functional dependence. 26/04/2018
Dependency, Determinants, and Other Jargon Multiple valued dependency A commonly used example of a multi-valued dependency is a field containing a comma-delimited list or collection of some kind. 26/04/2018
Dependency, Determinants, and Other Jargon Cyclic dependency The meaning of the word “cyclic” is a circular pattern, recurrent, closed ring, or a circular chain structure. In other words, X relates to Y, Y relates to Z, and Z relates to X. 26/04/2018
Defining Normal Forms The Academic Way The following are the precise academic definitions of Normal Forms : 1st Normal Form (1NF) – atomic 2nd Normal Form (2NF) – All non-key values must be fully functionally dependent on the primary key. 3rd Normal Form (3NF) – Eliminate transitive dependencies, meaning that a field is indirectly determined by the primary key. Boyce Code Normal Form (BCNF) – Every determinant in a table is a candidate key. If there is only one candidate key, 3NF and BCNF are one and the same. 26/04/2018
Defining Normal Forms The Academic Way The following are the precise academic definitions of Normal Forms : 4th Normal Form (4NF) – Eliminate multiple sets of multivalued dependencies 5th Normal Form (5NF) – Eliminate cyclic dependencies. 5NF is also known as Projection Normal Form (PJNF). Domain Key Normal Form (DKNF) – DKNF is the ultimate application of normalization and is more a measurement of conceptual state, as opposed to a transformation process in itself. 26/04/2018