a - normalizing a data model

18
Instructor : Dimara Kusuma Hakim, ST.

Upload: dimara-hakim

Post on 09-Jun-2015

926 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: a - Normalizing a Data Model

Instructor : Dimara Kusuma Hakim, ST.

Page 2: a - Normalizing a Data Model

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.

Page 3: a - Normalizing a Data Model

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).

Page 4: a - Normalizing a Data Model

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.

Page 5: a - Normalizing a Data Model
Page 6: a - Normalizing a Data Model

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.

Page 7: a - Normalizing a Data Model

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)

Page 8: a - Normalizing a Data Model

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 )

Page 9: a - Normalizing a Data Model

Tabel KIRIM-1 (Unnormal)

Page 10: a - Normalizing a Data Model

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

Page 11: a - Normalizing a Data Model

Tabel KIRIM-2 (1NF)

Page 12: a - Normalizing a Data Model

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.

Page 13: a - Normalizing a Data Model
Page 14: a - Normalizing a Data Model
Page 15: a - Normalizing a Data Model

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.

Page 16: a - Normalizing a Data Model
Page 17: a - Normalizing a Data Model

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.

Page 18: a - Normalizing a Data Model

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.