4.2.2. Perancangan Basis Data
a. Entity Relationship Diagram ERD
Gambar 4.12
. ERD
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
b. Normalisasi Berikut langkah-langkah normalisasi :
1 Bentuk Tidak Normal UNF
uid_plg nama
kelamin alamat
kd_kota negara
kdpost
UID012 UID013
Hendro Wibowo arisama iler
P P
Jl. Semanggi 2 No 5 Jl. Pesangrahan no 7
KK003 PR04
Indonesia Indonesia
15412 15487
email tlpn_rumah
telp_hp no_fax
userid passid
utomoyahoo.com utomoyahoo.com
ileryahoo.com ileryahoo.com
7440932 8792114
0856923159 0898966544
75544664 Che
Iler 773359240eb9a1d9
7dfg569240eghdfh4
no_pesan tanggal
tgl_limit jam
status_bayar unik_transfer
id_dpesan
TR-00002 TR-00003
12192009 12192009
12162009 12162009
22:47:54 13:02:55
PESAN PESAN
711 554
12 13
Jumlah_produk kd_produk
kategori kikis
packing nama_produk
1 5
KL0001 KL0002
RED RED
Belum Sudah
Plastik Plastik
AA RED A RED
file_gambar harga_produk
ukuran stok
detail
aacut.gif acut.gif
100000 100000
7 7
190 200
meta http-equiv=\ content-type\= content=\ meta http-equiv=\ content-type\= content=\
kd_propinsi nm_propinsi
id_konfirmasi bank_tujuan
bank_pengirim jam_transfer
PR01 PR02
Jawa Tengah Jawa Timur
5 8
BNI BNI
BCA Mandiri
0:12:12 13:02:45
jumlah_transfer keterangan
id_kantong jumlah
kd_kota nm_kota
hari harga_kirim
200456 500546
Sudah dikirim Segera
17 18
1 3
PR0001 PR0002
Amuntai Almapura
4 3
23500 16000
Gambar 4.13 . UNF
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
2 Bentuk Normal Pertama 1NF
uid_plg nama
kelamin alamat
kd_kota negara
kdpost
UID012 UID013
Hendro Wibowo arisama iler
P P
Jl. Semanggi 2 No 5 Jl. Pesangrahan no 7
KK003 PR04
Indonesia Indonesia
15412 15487
email tlpn_rumah
telp_hp no_fax
userid passid
utomoyahoo.com utomoyahoo.com
ileryahoo.com ileryahoo.com
7440932 8792114
0856923159 0898966544
75544664 Che
Iler 773359240eb9a1d9
7dfg569240eghdfh4
no_pesan tanggal
tgl_limit jam
status_bayar unik_transfer
id_dpesan
TR-00002 TR-00003
12192009 12192009
12162009 12162009
22:47:54 13:02:55
PESAN PESAN
711 554
12 13
Jumlah_produk kd_produk
kategori kikis
packing nama_produk
1 5
KL0001 KL0002
RED RED
Belum Sudah
Plastik Plastik
AA RED A RED
file_gambar harga_produk
ukuran stok
detail
aacut.gif acut.gif
10000 10000
7 7
190 200
meta http-equiv=\ content-type\= content=\ meta http-equiv=\ content-type\= content=\
kd_propinsi nm_propinsi
id_konfirmasi bank_tujuan
bank_pengirim jam_transfer
PR01 PR02
Jawa Tengah Jawa Timur
5 8
BNI BNI
BCA Mandiri
0:12:12 13:02:45
jumlah_transfer keterangan
id_kantong jumlah
kd_kota nm_kota
hari harga_kirim
200456 500546
Sudah dikirim Segera
17 18
1 3
PR0001 PR0002
Amuntai Almapura
4 3
23500 16000
Gambar 4.14 . 1NF
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
3 Bentuk Normal Kedua 2NF Langkah selanjutnya adalah membuat normal kedua.
Gambar 4.15 . 2 NF
Ket : Primary Key
Foreign Key
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
4 Bentuk Normal Ketiga 3NF
Gambar 4.16 . 3 NF
Ket : Primary Key
Foreign Key
c. Struktur Basis Data
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
Dari hasil normalisasi diatas telah didapat hasil basis data yang benar, berikut adalah perincian hasil normalisasi diatas.
1. Nama File : Kantong
Primary Key : Id_kantong
Foreign Key : Kd_produk, Uid_plg
Tabel 3.3. Tabel Kantong
Field Name Data Type
Extra
Id_kantong int5
auto_increment Kd_produk
char6 Uid_plg
char6
2. Nama File : Konfirmasi
Primary Key : Id_konfirmasi
Foreign Key : No_pesan
Tabel 3.4.
Tabel Konfirmasi
Field Name Data Type
Extra
Id_konfirmasi int5
auto_increment No_pesan
char8 Bank_tujuan
varchar10 Bankpengirim
varchar10 Jam_transfer
time Jumlah_transfer
int10 Keterangan
text
3. Nama File : Kota
Primary Key : Kd_kota
Foreign Key : Kd_propinsi
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
Tabel 3.5. Tabel Kota
Field Name Data Type
Extra
Kd_kota char6
auto_increment Kd_propinsi
char4 Nm_kota
varchar15 Harga_kirim
int5 Hari
int1
4. Nama File : Pelanggan
Primary Key : Uid-plg
Foreign Key : -
Tabel 3.6.
Tabel Pelanggan
Field Name Data Type
Extra
Uid_plg char6
auto_increment Nama
varchar20 Kelamin
enumP, W Alamat
varchar50 Kd_kota
char6 Negara
varchar15 Kdpost
int5 Email
varchar20 Telp_rumah
varchar15 Telp_hp
varchar15 No_fax
varchar15 Userid
varchar35 Passid
varchar35
5. Nama File : Pemesanan
Primary Key : No_pesan
Foreign Key : Uid_plg
Tabel 3.7. Tabel Pemesanan
Field Name Data Type
Extra
No_pesan char8
auto_increment Uid_plg
char6 Tgl_pesan
date Tgl_limit
date Jam_pesan
time
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
Status_bayar varchar5
Unik_transfer char3
6. Nama File : Detail
Primary Key : Id_pesan
Foreign Key : No_pesan, Kd_produk
Tabel 3.8. Tabel Detail
Field Name Data Type
Extra
Id_pesan int4
auto_increment No_pesan
char8 Kd_produk
char6 Jumlah_produk
int3
7. Nama File : Produk
Primary Key : Kd_produk
Foreign Key : -
Tabel 3.9. Tabel Produk
Field Name Data Type
Extra
Kd_produk char6
auto_increment Kategori
char10 Kikis
char10 Packing
char15 Nm_produk
varchar10 File_gambar
varchar100 Harga _produk
int5 Ukuran
int2 Stok
int4 Detail
text 8. Nama File
: Propinsi Primary Key
: Kd_propinsi Foreign Key
: -
Tabel 3.10.
Tabel Propinsi
Field Name Data Type
Extra
Kd_propinsi char4
auto_increment Nm_propinsi
varchar20
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
d. Matrik CRUD Create, Read, Update, Delete
Tabel 3.11.
Tabel Matrik CRUD
Location Entity.atribut
Admin Pelanggan
Admin INDV
Id_admin CD
Password CRUD
Nama_lengkap CRUD
Email CRUD
Berita ALL
ALL
Id_berita CD
X Judul
CRUD R
Isi_berita CRUD
R Gambar
CRUD R
Hari CRUD
R Tanggal
CRUD R
Jam CRUD
R Counter
CRUD R
Bukutamu ALL
ALL
Id_btamu D
C Nama
RD CR
Email RD
CR Komentar
RD CR
Tanggal RD
CR
Galeri ALL
ALL
Id_galeri CD
X Judul
CRUD R
Gambar CRUD
R
Kantong INDV
Id_kantong CD
Kd_produk CRUD
Uid_plg CRUD
Jumlah CRUD
Konfirmasi ALL
INDV
Id_konfirmasi RD
C No_pesan
RD C
Bank_tujuan RD
C Bankpengirim
RD C
Jam_transfer RD
C Jumlah_transfer
RD C
Keterangan RD
C
Kontak ALL
INDV
Id_kontak RD
C Nama
RD C
Email RD
C
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
Telpn RD
C Alamat
RD C
Subject RD
C Pesan
RD C
Kota ALL
ALL
Kd_kota CRD
X Kd_propinsi
CRUD X
Nm_kota CRUD
R Harga_kirim
CRUD R
Hari CRUD
R
Pelanggan ALL
INDV
Uid_plg RD
CR Nama
RD CRU
Kelamin RD
CR Alamat
RD CRU
Kd_kota D
CU Kd_propinsi
D CU
Negara RD
CR Kdpost
RD CRU
Email RD
CRU Telp_rumah
RD CRU
Telp_hp RD
CRU No_fax
RD CRU
Userid RD
CR Passid
RD CR
Pemesanan ALL
INDV
No_pesan RD
CR Uid_plg
RD CR
Tgl_pesan RD
CR Tgl_limit
RD CR
Jam_pesan RD
CR Status_bayar
RUD CR
Unik_transfer RD
CR
Pemesanan_detail ALL
INDV
Id_pesan D
C No_pesan
RD CR
Kd_produk D
C Jumlah_produk
RD CR
Produk ALL
ALL
Kd_produk CRD
X Kategori
CRUD R
Kikis CRUD
R Packing
CRUD R
Nm_produk CRUD
R File_gambar
CRUD R
Harga _produk CRUD
R Ukuran
CRUD R
Stok CRUD
R
Evaluation notes were added to the output document. To get rid of these notes, please order your copy of ePrint 5.0 now.
Detail CRUD
R
Propinsi ALL
ALL
Kd_propinsi X
X Nm_propinsi
R R
Keterangan: INDV = individual, ALL = all, SS = subset, X = no access, C = create, R =
read ,
U = update, D = delete
4.2.3. Perancangan Interface