46 3. 17. Perancangan Database. 3.17.1 Perancangan Database Dengan ERD. M N NASABAH GADAI BARANG No_KTP / SIM * Nama_Nasabah No_Surat_Kredit * Tgl_Kredit Tgl_Pengemb alian _Kredit Kode_Brg * Nama_Brg Tot_Taksira n_brg Alamat Telepon Pekerjaan Taksiran Bunga Bunga Nominal_Pinj aman 3.17.2 Normalisasi.
47 Atribut dari diagram ERD disebelah dikonversikan atau dibuatkan dalam bentuk tabel yaitu : Tabel 3.1 Penggadaian Barang. No_KTP / SIM * Nama_Nasabah Alamat Telepon Pekerjaan No_Surat_Kredit * Tgl_Kredit Tgl_Pengembalian_Kredit Taksiran Bunga Nominal_Pinjaman Kode_Brg * Nama_Brg Tot_Taksiran_Brg Tabel diatas sudah normal, karena tidak ada atribut yang sama. Tetapi tidak bisa masuk normal ke 2, karena ada atribut yang tidak bisa tergantung penuh pada key yang unik. Maka tabel tersebut dipecah menjadi 2 tabel yaitu : Tabel 3. 2 Nasabah No_KTP / SIM * Nama_Nasabah Alamat Telepon Pekerjaan Tabel 3.3 Gadai No_Surat_Kredit * Tgl_Kredit Tgl_Pengembalian_ Kredit Taksiran Bunga Nominal_Pinjaman Tabel 3.2 sudah normal ke 1 karena sudah memiliki key unik dan atribut atributnya selain tergantung penuh pada key, maka tabel 3. 2 tidak bisa dipecah lagi. Tabe 3.3 belum masuk normal ke 2 maka :
48 3.4 Tabel Barang Kode_Brg * Nama_Brg Tot_Taksiran_Brg Tabel 3.3 Gadai No_Surat_Kredit * Tgl_Kredit Tgl_Pengembalian_ Kredit Taksiran Bunga Nominal_Pinjaman Tabel barang dan tabel gadai sudah normal 2 = 3 karena setiap tabel sudah memiliki key dan atribut atribut selain key dari setiap tabel tergantung penuh pada keynya. 3.17. 3 Keterhubungan Tabel Dalam Database.
49 TABEL NASABAH No_KTP / SIM * NamaNasabah Alamat Telepon Pekerjaan TABEL BARANG Kode_Brg * Nama_Brg Tot_Taksiran_Brg TABEL GADAI No_Surat_Kredit * Tgl_Kredit Tgl _Pengembalian_Kredit Taksiran Bunga Nominal_Pinjaman No_KTP / SIM ** Kode_Brg ** Gambar 3. 4 Keterhubungan tabel dalam database 3.18 Struktur File.
50 1. File : Nasabah.mdb Fungsi : Untuk Menyimpan data nasabah. Key File : No_KTP / SIM NO Nama Field Type Width Keterangan 1 *No_KTP / SIM Text 25 Nomor KTP / SIM 2 Nama_Nasabah Text 25-3 Alamat Text 50-4 Telepon Text 13-5 Pekerjaan Text 25 - Tabel 1. Nasabah. 2. File : Gadai.mdb Fungsi : Untuk menyimpan data gadai nasabah. Key File : No_Surat_Kredit NO Nama Field Type Width Keterangan 1 *No_Surat_Kredit Text 15 Nomor Surat Kredit 2 Tgl_Kredit Text 15 Tanggal Kredit 3 Tgl_Pengembalian_Kredit Text 8 Tanggal Pengembalian Kredit 4 Taksiran Currency 8-5 Bunga Text 5-6 Kode_Brg Text 20 Kode barang 7 No_KTP/SIM Text 20 Nomor KTP atau SIM 8 Nominal_Pinjaman Currency 8 - Tabel 2. Gadai. 3. File : Barang.mdb
51 Fungsi Key File : Untuk menyimpan data barang. : Surat_Brg NO Nama Field Type Width Keterangan 1 *Kode_Brg Text 20 Kode barang 2 Nama_Brg Text 25 Nama barang 3 Tot_Taksiran_Brg Currency 8 Total taksiran barang Tabel 3. Barang. 3.19. Membuat Database. Untuk membuat database baru dengan Visual Basic : 1. Jalankan atau aktifkan program aplikasi Visual Baisc 6.0 2. Kemudian klik Add Ins > Visual Data Manager pada toolbar. 3. Setelah itu muncul tampilan kotak Visdata seperti dibawah ini : Gambar 3.5 Tampilan VisData.
52 4. Klik file > New >Microsoft Access Version 7.0 MDB. 5. Kemudian muncul kotak Select Microsoft Access Database To Create. Gambar 3. 6 Microsoft Access Database to Create. 6. Pilih pada drive mana data ingin disimpan pada Save In. 7. Ketikkan nama file pada File name dan klik save. 8. Maka akan muncul jendela Database Window.
53 Gambar 3.7 Database Windows. 9. Pada jendela SQL Statement buatlah nama table tablenya dan klik save. Gambar 3.8 SQL Statement.
54 3.20 Rancangan Input 1. Form Login Gambar 3. 9 Form Login. OBYEK PROPERTI PENGATURAN Command 1 Caption Exit Command 2 Caption Login Data Login User Caption Data 1 Form Caption Login Label 1 Caption Perum Pegadaian Label 2 Caption Cabang Pasar Rumput Label 3 Caption Jl. Sultan Agung No 59 B Telp ( 021 ) 8353770 Label 4 Caption Nama Label 5 Caption Password Text 1 Caption None Text 2 Caption None Shape 1 Shape Rectangle Shape 2 Shape Rounded Rectangle
55 2. Form Nasabah Gambar 3. 10 Form Nasabah. OBYEK PROPERTI PENGATURAN Command 1 Caption Add Command 2 Caption Cancel Command 3 Caption Delete Command 4 Caption Edit Command 5 Caption < Command 6 Caption > Command 7 Caption Log out
Command 8 Caption > Command 9 Caption < Command 10 Caption Save Command 11 Caption Next Command 12 Caption Update Data Nasabah Caption Data 1 Data Transaksi Caption Data 1 Form Caption Data Nasabah Label 1 Caption NO KTP / SIM Label 2 Caption Data Label 3 Caption Nama Nasabah Label 4 Caption Alamat Label 5 Caption Telepon Label 6 Caption Pekerjaan Text 1 Caption None Text 2 Caption None Text 3 Caption None Text 4 Caption None Combo box Caption None Shape 1 Shape Rectangle Shape 2 Shape Rectangle 56
57 3. Form Gadai Gambar 3.11 Form Gadai Obyek Properti Pengaturan Combo box 1 Text None Combo box 2 Text None Command 1 Caption Add Command 2 Caption Cancel Command 3 Caption Delete Command 4 Caption Edit Command 5 Caption < Command 6 Caption > Command 7 Caption > Command 8 Caption Preview Command 9 Caption < Command 10 Caption Save Command 11 Caption Finish Command 12 Caption Update Data Nasabah Caption Data 1 Data Barang Caption Data 2
Data Transaksi Caption Data 3 Form Caption Data Transaksi Label 1 Caption Perum Pegadaian Label 2 Caption Cab. Pasar Rumput Label 3 Caption Jl. Sultan Agung No 59 B Telp ( 021 ) 8353770 Label 4 Caption Data Gadai Label 5 Caption No Surat Kredit Label 6 Caption Tanggal Kredit Label 7 Caption No KTP / SIM Label 8 Caption Jumlah Taksiran (Rp) Label 9 Caption Bunga Label 10 Caption Tgl Pengembalian Kredit Label 11 Caption Nominal Pinjaman Label 12 Caption Kode Barang Lbljam Caption - Lbltanggal Caption - Shape 1 Shape Rectangle Shape 2 Shape Rounded Rectangle Shape 3 Shape Rounded Rectangle Shape 4 Shape Rectangle Shape 5 Shape Oval Timer Interval 1000 Text 1 Text None Text 2 Text None Text 3 Text None Text 4 Text None Text 5 Text None DtPicker Format Shortdate 58
59 4. Form Barang Gambar 3. 12 Form Barang. Obyek Properti Pengaturan Combo box 1 Text - Command 1 Caption Add Command 2 Caption Cancel Command 3 Caption Delete Command 4 Caption Edit Command 5 Caption < Command 6 Caption > Command 7 Caption > Command 8 Caption < Command 9 Caption Save Command 10 Caption Next Command 11 Caption Update Data Barang Caption Data 1 Data Transaksi Caption Data 1 Form Caption Data Barang Label 1 Caption Perum Pegadaian Label 2 Caption Cab. Pasar Rumput
60 Label 3 Caption Jl. Sultan Agung No 59 B Telp ( 021 ) 8353770 Label 4 Caption Surat Barang Label 5 Caption Nama Barang Label 6 Caption Total Taksiran Barang (Rp ) Label 7 Caption Data Barang Shape 1 Shape Rectangle Shape 2 Shape Rectangle Shape 3 Shape Rounded Rectangle Shape 4 Shape Rectangle Text 1 Caption None Text 2 Caption None 3. 21 OUTPUT. PERUM PEGADAIAN Cab. PASAR RUMPUT JL. Sultan agung No 59 B Telp ( 021 ) 8353770 DATA GADAI No Surat Kredit Tgl Kredit Tgl Pengembalian No_KTP/SIM Nominal Pinjaman 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999
61 3.22 Spesifikasi Program. Untuk menjalankan program Microsoft Visual Basic 6.0 ini, spesifikasi minimal komputer yang dibutuhkan adalah : 1. Sistem operasi Windows 98. 2. CPU dengan minimum Processor Intel Pentium 200 MHZ. 3. Hardisk free space 70.6 MB ( Microsoft Visual Basic 6.0 ). 4. Monitor 640 x 480 High Color ( 16 bit ). 5. RAM minimal 64 MB. 6. Graphic Card minimal 4 MB. Hardware pendukug yang digunakan penulis : 1. Sistem operasi Windows XP. 2. Processor Intel Pentium III Celeron. 3. SDRAM 196 MB. 4. Graphic Card Voodoo 32 MB.