System Information Bank(Example Oracle Data_base)

Analysis

A client came and wanted to save his money in a private bank that is BCA, when customers come in and be examined by bank employees. Every customer who will save the customer will be asked no.rekening tersebut.sehingga no.rekening as the main goal to be able to save. And employees of registering / searching no.rekening it, after and in the can. Employees directly ask how much customers will save money.

Create Table

SQL> create table data_bank( 
  2  kode_unit number(10) not null primary key, 
  3  nama_bank varchar2(6), 
  4  alamat varchar2(10),
  5  cabang varchar2(5),
  6  keterangan varchar2(10)
  7 );

SQL> create table data_nasabah( 
  2  no_rekening number(10) not null primary key, 
  3  nama varchar2(5), 
  4  alamat varchar2(10),
  5  ktp number(5),
  6  jenis_kelamin char(10)
  7 );

SQL> create table data_peminjaman( 
  2  no_rekening number(10) ,
  3  tanggal date, 
  4  tanggal_akhir date,
  5  jumlah_pinjaman number(8),
  6  jumlah_bulanan number(8)
  7 );

SQL> create table data_tabungan( 
  2  no_rekening number(10) ,
  3  password number(2), 
  4  tanggal date,
  5  jumlah_tabungan number(6),
  6  keterangan varchar2(5)
  7 );

SQL> create table data_master( 
  2  no_rekening number(10), 
  3  kode_unit number(10) 
  4 jumlah_tabungan number(8),
  5 sisa_peminjaman number(8)
  4  );

<pre> 

Relation

SQL> alter table data_peminjaman add constraint nasabah_peminjaman foreign key (no_rekening) references data_nasabah (no_rekening)

SQL> alter table data_tabungan add constraint nasabah_tabungan foreign key (no_rekening) references data_nasabah (no_rekening); 

SQL> alter table data_master add constraint master_nasabah foreign key (no_rekening) references data_nasabah (no_rekening); 
<pre> 

SQL> alter table data_master add constraint master_bank foreign key (kode_unit) references data_bank (kode_unit);
<pre> 

Insert Table

Insert table Data_bank

SQL> insert into data_bank 2 values ('100','bri','jl.janti','jogja',''); SQL> insert into data_bank 2 values ('200','bni','jl.condong','solo',''); SQL> insert into data_bank 2 values('300','bca','jl.jos','klaten',''); SQL> insert into data_bank 2 values('400','syariah','jl.eki','surabaya',''); SQL> insert into data_bank 2 values('500','demokrat','jl.dede','jakarta','');

insert table data_nasabah

SQL> insert into data_nasabah 2 values('001','dede','jogja','201','l'); SQL> insert into data_nasabah 2 values('002','ardi','solo','234','l'); SQL> insert into data_nasabah 2 values('003','putri','klaten','345','p'); SQL> insert into data_nasabah 2 values('004','nia','jakarta','455','l'); SQL> insert into data_nasabah 2 values('005','anggi','surabaya','4677','l');

Insert table data_peminjaman

SQL> insert into data_peminjaman 2 values('001','02-jun-1992','02-jul-1993','3000','100'); SQL> insert into data_peminjaman 2 values('002','30-may-2010','30-jun-2010','4000','200'); SQL> insert into data_peminjaman 2 values('003','20-mar-2011','20-apr-2011','4000','300'); SQL> insert into data_peminjaman 2 values('004','19-sep-2012','19-oct-2012','7000','400'); SQL> insert into data_peminjaman 2 values('005','11-feb-2010','11-mar-2010','5000','100');

Insert table data_tabungan

SQL> insert into data_tabungan 2 values('001','1','30-dec-2010','10000','tb01'); SQL> insert into data_tabungan 2 values('002','3','12-jan-2010','20000','tb56'); SQL> insert into data_tabungan 2 values('003','6','22-jun-2011','30000','fd6'); SQL> insert into data_tabungan 2 values('004','7','11-feb-2009','40000','dfdg'); SQL> insert into data_tabungan 2 values('005','9','21-nov-2010','50000','03df');

Insert Tabel Data_master

SQL> insert into data_master 2 values ('002','200','','',''); SQL> insert into data_master 2 values ('001','100','','',''); <pre>

Display All Table

SQL> select *from data_nasabah,data_tabungan where data_nasabah.no_rekening=data_tabungan.no_rekening;

SQL>Select *from data_nasabah,data_tabungan,data_peminjaman,data_bank where
data_nasabah.no_rekening=data_tabungan.no_rekening and data_nasabah.no_rekening=data_peminjaman.no_rekening.

<pre> 

imagination more important than knowledge

Download File pdf pdf pdf

Advertisements

Published by

jarcode

hello I am jarcode

2 thoughts on “System Information Bank(Example Oracle Data_base)”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s