• Tidak ada hasil yang ditemukan

NORMALIZATION

N/A
N/A
Protected

Academic year: 2025

Membagikan "NORMALIZATION"

Copied!
9
0
0

Teks penuh

(1)

P R E PA R E B Y M U ’ TA S E M J A R R A H M U TA S E M . J A R R A H @ YA H O O. C O M

Normalization

(2)

What is Normalization ?

 Database normalization is a technique for designing relational database tables to minimize duplication of information and, in so doing, to safeguard the database against certain types of logical or structural problems, namely data anomalies.

 to avoiding duplicate data and easy

maintence it depends on entity relationship

between columns

(3)

Comprehensive Example contains 1NF,2NF and 3NF

Cost Days Type Vedio_Name Vedio

_ID City Phone Custome

r _Name Customer_I

D Date Receipt

3.00 1 N Al-Resalah 325 Makkah 4567893

2 Ali 226 9/1/2008 1000

2.50 2 H Salah Addein 548 Makkah 4567893

2 Ali 226 9/1/2008 1000

2.50 2 H Haron AL-

Rashed

6437 Makkah 4567893 2

Ali 226 9/1/2008 1000

3.00 1 N Al-Resalah 325 Jeddah 7654321 Omar 224 9/4/2008 1001

2.50 2 H Haron AL-

Rashed 6437 Jeddah 7654321 Omar 224 9/4/2008 1001

3.00 1 N Islam Today 468 Makkah 4567893

2 Ali 226 10/2/2008 1002

* To get 1NF (Remove the Repeating groups)

(4)

Table 1

City Phone Customer_Name Customer_ID Date Receipt

Makkah 45678932 Ali 226 9/1/2008 1000

Jeddah 7654321 Omar 224 9/4/2008 1001

Makkah 45678932 Ali 226 10/2/2008 1002

Cost Days Type Vedio_Name Vedio _ID Receipt

3.00 1 N Al-Resalah 325 1000

2.50 2 H Salah Addein 548 1000

2.50 2 H Haron AL-Rashed 6437 1000

3.00 1 N Al-Resalah 325 1001

2.50 2 H Haron AL-Rashed 6437 1001

3.00 1 N Islam Today 468 1002

Table 2

(5)

Connection between table 1 & table 2?

Table1 (Receipt, Date, Customer_ID, Customer_Name, Phone, City)

Table2(Receipt, Vedio_ID, Vedio_Name, Type, Days, Cost)

* To get 2NF (Identify & Remove Partial FD)

• Table 2 : Table3, Table4

• Vedio_ID --- [ Vedio_Name, Type, Days, Cost]

Cost Days Type Vedio_Name Vedio_ID

3.00 1 N Al-Resalah 325

2.50 2 H Salah Addein 548

2.50 2 H Haron AL-

Rashed 6437

3.00 1 N Islam Today 468

Table 3

(6)

Vedio_ID Receipt

325 1000

548 1000

6437 1000

325 1001

6437 1001

468 1002

Table 4

(7)

* To get 3NF (First Step – From table1) ---[ Table5,Table6]

• Table1 ( Receipt, Date, Customer_ID, Customer_Name, Phone,City)

• Customer_ID ---[Customer_Name, Phone,City].

City Phone Customer_Na

me Customer_ID

Makkah 45678932 Ali 226

Jeddah 7654321 Omar 224

Table 5

Customer_ID Date Receipt

226 9/1/2008 1000

224 9/4/2008 1001

226 10/2/2008 1002

Table 6

(8)

• (Second Step – From table3)

 Vedio_ID ---[Vedio_Nmae]

 Vedio_ID---[Type]

 Type---[Days,cost]

 From table3 :- Table7, Table8

Cost Days Type Vedio_Name Vedio_ID

3.00 1 N Al-Resalah 325

2.50 2 H Salah Addein 548

2.50 2 H Haron AL-

Rashed

6437

3.00 1 N Islam Today 468

(9)

Type Vedio_Name Vedio_ID

N Al-Resalah 325

H Salah Addein 548

H Haron AL-Rashed 6437

N Islam Today 468

Table 7

Type Cost Days

N 3.00 1

H 2.50 2

Table 8

Referensi

Dokumen terkait