a - Normalizing a Data Model

Preview:

Citation preview

Instructor : Dimara Kusuma Hakim, ST.

What Is Normalization? At its most basic level, normalization is

the process of simplifying your data into its most efficient form by eliminating redundant data.

Efficiency, in this case, refers to reducing complexity from a logical standpoint.

Efficiency does not necessarily equal better performance, nor does it necessarily equate to efficient query processing.

Normal Forms E. F. Codd, who was the IBM researcher

credited with the creation and evolution of the relational database, set forth a set of rules that define how data should be organized in a relational database. Initially, he proposed three sequential forms to classify data in a database: first normal form (1NF)second normal form (2NF)third normal form (3NF).

Normal Forms …cont… After these initial normal forms were

developed, research indicated that they could result in update anomalies, so three additional forms were developed to deal with these issues: fourth normal form (4NF), fifth normal form (5NF), and the Boyce-Codd normal form (BCNF). There has been research into a sixth normal form (6NF); this normal form has to do with temporal databases and is outside the scope of this discussion.

Ketergantungan Fungsional Atribut Y pada relasi R dikatakan

tergantung fungsional pada atribut X (R.X ---> R.Y), jika dan hanya jika setiap nilai X pada relasi R mempunyai tepat satu nilai Y pada R.

Ketergantungan Fungsional Penuh Atribut Y pada relasi R dikatakan tergantung fungsional

penuh pada atribut X pada relasi R, jika Y tidak tergantung pada subset dari X ( bila X adalah key gabungan)

Atau jika Y tergantung pada X (suatu gabungan beberapa atribut)

Ketergantungan Transitif / Ganda Atribut Z pada relasi R dikatakan tergantung

transitif pada atribut X , jika atribut Y tergantung pada atribut X pada relasi R dan atribut Z tergantung pada atribut Y pada relasi R. ( X Y, Y Z , maka X Z )

Tabel KIRIM-1 (Unnormal)

First Normal Form (1NF) Suatu relasi dikatakan sudah memenuhi

Bentuk Normal Kesatu bila setiap data bersifat atomik yaitu setiap irisan baris dan kolom hanya mempunyai satu nilai data

Tabel KIRIM-2 (1NF)

Second Normal Form (2NF) Suatu relasi dikatakan sudah memenuhi

Bentuk Normal Kedua bila relasi tersebut sudah memenuhi bentuk Normal kesatu, dan atribut yang bukan key sudah tergantung penuh terhadap key-nya.

Third Normal Form (3NF) Suatu relasi dikatakan sudah memenuhi

Bentuk Normal ketiga bila relasi tersebut sudah memenuhi bentuk Normal kedua dan atribut yang bukan key tidak tergantung transitif terhadap keynya.

NORMALIZATION VS. DENORMALIZATION

Normalization means reducing duplicate data by using keys or IDs to relate rows of information from one table to another, for example, customers and their orders.

Denormalization means the opposite, which is deliberately duplicating data in one or more structures.

Cont….NORMALIZATION VS. DENORMALIZATION Normalization improves the efficiency of

inserting, updating, or deleting data. The fewer places the data has to be updated, the more efficient the update and the greater the data integrity.

Denormalization improves the efficiency of reading or selecting data and reduces the number of tables the data engine has to access or the number of calculations it has to perform to provide information.

Recommended