130 likes | 143 Views
Learn about the concept of normalization, types of normal forms, anomalies, dependencies, determinants, and other essential jargon in database design, crucial for creating a robust business model.
E N D
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)
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 alwaysexpecting a designer to apply every Normal Form layer in every situation
The Concept of Anomalies Insert anomaly • Caused when a record is added to a detail table, with no related recordexisting in a master table. tabel_jurusan tabel_fakultas Insert
The Concept of Anomalies Delete anomaly • Caused when a record is deleted from a master table, without first deleting allsibling records, in a detail table. tabel_jurusan tabel_fakultas ?
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 previouspoint is X because X determines the value Y, at least partially because 1 is added to X as well. tabel_fakultas FAK01 Determines that the faculty name is Teknik Ekonomi is dependant on the code being FAK02
Dependency, Determinants, and Other Jargon Transitive dependency • Z is transitively dependent on X when X determines Y and Y determinesZ. 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
Dependency, Determinants, and Other Jargon Full Functional dependency • This situation occurs where X determines Y, but X combined withZ does not determine Y. • In other words, Y depends on X and X alone. • If Y depends on X withanything else, there is not full functional dependence.
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.
Dependency, Determinants, and Other Jargon Cyclic dependency • The meaning of the word “cyclic” is a circular pattern, recurrent, closedring, or a circular chain structure. • In other words, X relates to Y, Y relates to Z, and Z relates to X.
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.
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.