1.Tabel Anggota
CREATE table anggota
(ID_Anggota text(5)primary key,Nama text(10),Alamat text(15),No_Telp text(12),Tgl_Lahir Date);
INSERT into anggota
Values("BB001","Anugerah","JL.Genuksari","085677889000","07/02/1990")
INSERT into anggota
Values("BB002","Mahrita","JL.Bates Utara ","081228004432","08/02/1989")
Values("BB002","Mahrita","JL.Bates Utara ","081228004432","08/02/1989")
INSERT into anggota
Values("BB003","Retno","JL.Mekarjaya","08995543212","07/09/1988")
INSERT into anggota
Values("BB004","Debora","JL.Plamonganraya","08995437666","11/11/1985")
INSERT into anggota
Values("BB005","Lydia","JL.Genuk Indah","087987678899","12/12/1980")
ID_Anggota | Nama | Alamat | No_Telp | Tgl_Lahir |
---|---|---|---|---|
BB001 | Anugerah | JL.Genuksari | 085677889000 | 07/02/1990 |
BB002 | Mahrita | JL.Bates Utara | 081228004432 | 08/02/1989 |
BB003 | Retno | JL.Mekarjaya | 08995543212 | 07/09/1988 |
BB004 | Debora | JL.Plamonganray | 08995437666 | 11/11/1985 |
BB005 | Lydia | JL.Genuk Indah | 087987678899 | 12/12/1980 |
2.Tabel Buku
CREATE table buku
(No_Buku text (5)primary key,Judul text (15),Pengarang text (10),Jenis_Buku text(15));
INSERT into buku
Values("CC001","Kesehatan","Erlangga","Pengetahuan")
INSERT into buku
Values("CC002","Matematika","Budi","Pengetahuan")
Values("CC002","Matematika","Budi","Pengetahuan")
INSERT into buku
Values("CC003","Geografi","Galih","Pengetahuan")
Values("CC003","Geografi","Galih","Pengetahuan")
INSERT into buku
Values("CC004","Sepakbola","Andi","Olahraga")
Values("CC004","Sepakbola","Andi","Olahraga")
INSERT into buku
Values("CC005","Cintaku","Mira","Novel")
Values("CC005","Cintaku","Mira","Novel")
No_Buku | Judul | Pengarang | Jenis_Buku |
---|---|---|---|
CC001 | Kesehatan | Erlangga | Pengetahuan |
CC002 | Matematika | Budi | Pengetahuan |
CC003 | Geografi | Galih | Pengetahuan |
CC004 | Sepakbola | Andi | Olahraga |
CC005 | Cintaku | Mira | Novel |
3.Tabel Transaksi
CREATE table transaksi
(No_Pinjam text (4) primary key,Nama text(10),ID_Anggota text (5 ),No_Buku text (5),Tgl_pinjam Date,Tgl_Kembali Date)
(No_Pinjam text (4) primary key,Nama text(10),ID_Anggota text (5 ),No_Buku text (5),Tgl_pinjam Date,Tgl_Kembali Date)
INSERT into transaksi
Values("PJ01","Anugerah","BB001","CC001","01/11/2011","07/11/2011")
INSERT into transaksi
Values("PJ02","Mahrita","BB002","CC002","02/11/2011","08/11/2011")
INSERT into transaksi
Values("PJ03","Retno","BB003","CC003","03/11/2011","09/11/2011")
INSERT into transaksi
Values("PJ04","Debora","BB004","CC004","04/11/2011","10/11/2011")
INSERT into transaksi
Values("PJ05","Lydia","BB005","CC005","05/11/2011","11/11/2011")
No_Pinjam | Nama | ID_Anggota | No_Buku | Tgl_pinjam | Tgl_Kembali |
---|---|---|---|---|---|
PJ01 | Anugerah | BB001 | CC001 | 01/11/2011 | 07/11/2011 |
PJ02 | Mahrita | BB002 | CC002 | 02/11/2011 | 08/11/2011 |
PJ03 | Retno | BB003 | CC003 | 03/11/2011 | 09/11/2011 |
PJ04 | Debora | BB004 | CC004 | 04/11/2011 | 10/11/2011 |
PJ05 | Lydia | BB005 | CC005 | 05/11/2011 | 11/11/2011 |
Tidak ada komentar:
Posting Komentar