-
Notifications
You must be signed in to change notification settings - Fork 1
/
tokobuku_online.sql
185 lines (144 loc) · 5.31 KB
/
tokobuku_online.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 23, 2011 at 05:16 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `perpustakaan`
--
-- --------------------------------------------------------
--
-- Table structure for table `admin`
--
CREATE TABLE IF NOT EXISTS `admin` (
`uid` int(4) NOT NULL AUTO_INCREMENT,
`username` varchar(20) NOT NULL,
`password` varchar(60) NOT NULL,
PRIMARY KEY (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`uid`, `username`, `password`) VALUES
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3');
-- --------------------------------------------------------
--
-- Table structure for table `buku`
--
CREATE TABLE IF NOT EXISTS `buku` (
`isbn` char(10) NOT NULL COMMENT 'ISBN',
`judul` varchar(50) NOT NULL COMMENT 'Judul',
`nomorEdisi` varchar(12) NOT NULL COMMENT 'Nomor Edisi',
`copyright` int(11) NOT NULL COMMENT 'Copyright',
`deskripsi` varchar(100) NOT NULL COMMENT 'Deskripsi',
`IDPenerbit` int(11) NOT NULL COMMENT 'ID Penerbit',
`fileGambar` varchar(25) NOT NULL COMMENT 'File Gambar',
`harga` int(11) NOT NULL COMMENT 'Harga',
PRIMARY KEY (`isbn`),
KEY `IDPenerbit` (`IDPenerbit`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `buku`
--
INSERT INTO `buku` (`isbn`, `judul`, `nomorEdisi`, `copyright`, `deskripsi`, `IDPenerbit`, `fileGambar`, `harga`) VALUES
('123', 'Belajar MySQL', '1231', 2011, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the', 123459, '1306721315.jpg', 10000),
('12345', 'Ajax', '12', 2011, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the', 123459, '1306721165.jpg', 20000),
('Hele', 'Oracle', '231', 2011, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the', 123459, '1306721387.jpg', 12000);
-- --------------------------------------------------------
--
-- Table structure for table `DetailOrder`
--
CREATE TABLE IF NOT EXISTS `DetailOrder` (
`IDOrderDetail` int(11) NOT NULL AUTO_INCREMENT,
`IDOrder` int(11) NOT NULL,
`ISBN` char(15) NOT NULL,
`JumlahBeli` int(11) NOT NULL,
PRIMARY KEY (`IDOrderDetail`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `DetailOrder`
--
-- --------------------------------------------------------
--
-- Table structure for table `member`
--
CREATE TABLE IF NOT EXISTS `member` (
`id_member` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(25) NOT NULL,
`password` varchar(50) NOT NULL,
`NamaLengkap` varchar(50) NOT NULL,
`Alamat` varchar(75) NOT NULL,
`LevelMember` enum('admin','member') NOT NULL,
`Provinsi` varchar(20) NOT NULL,
`Kota` varchar(20) NOT NULL,
PRIMARY KEY (`id_member`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `username_2` (`username`),
UNIQUE KEY `id_member_2` (`id_member`),
KEY `id_member` (`id_member`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
--
-- Dumping data for table `member`
--
INSERT INTO `member` (`id_member`, `username`, `password`, `NamaLengkap`, `Alamat`, `LevelMember`, `Provinsi`, `Kota`) VALUES
(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Tejo Murti', 'Jl. Gejayan', 'admin', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `OrderData`
--
CREATE TABLE IF NOT EXISTS `OrderData` (
`IDOrder` int(11) NOT NULL AUTO_INCREMENT,
`id_member` int(11) NOT NULL,
`TanggalOrder` date NOT NULL,
`StatusOrder` enum('baru','lunas','terkirim') NOT NULL,
PRIMARY KEY (`IDOrder`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `OrderData`
--
-- --------------------------------------------------------
--
-- Table structure for table `penerbit`
--
CREATE TABLE IF NOT EXISTS `penerbit` (
`IDPenerbit` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID Penerbit',
`namaPenerbit` varchar(25) NOT NULL COMMENT 'Nama Penerbit',
`alamatPenerbit` varchar(50) NOT NULL COMMENT 'Alamat Penerbit',
PRIMARY KEY (`IDPenerbit`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=123460 ;
--
-- Dumping data for table `penerbit`
--
INSERT INTO `penerbit` (`IDPenerbit`, `namaPenerbit`, `alamatPenerbit`) VALUES
(123459, 'Andi Publisher', 'Jl. gejayan 12');
-- --------------------------------------------------------
--
-- Table structure for table `ShoppingCart`
--
CREATE TABLE IF NOT EXISTS `ShoppingCart` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`SessionId` varchar(50) NOT NULL,
`ISBN` char(15) NOT NULL,
`JumlahBeli` int(11) NOT NULL,
`TanggalOrder` date NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `ShoppingCart`
--
--
-- Constraints for dumped tables
--
--
-- Constraints for table `buku`
--
ALTER TABLE `buku`
ADD CONSTRAINT `buku_ibfk_1` FOREIGN KEY (`IDPenerbit`) REFERENCES `penerbit` (`IDPenerbit`) ON DELETE CASCADE ON UPDATE CASCADE;