-
Notifications
You must be signed in to change notification settings - Fork 16
/
ci_tourism.sql
319 lines (267 loc) · 16.3 KB
/
ci_tourism.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 25, 2016 at 09:39 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.5.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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 utf8mb4 */;
--
-- Database: `ci_tourism`
--
-- --------------------------------------------------------
--
-- Table structure for table `costs`
--
CREATE TABLE `costs` (
`costId` int(11) NOT NULL,
`visitId` int(11) NOT NULL,
`packageId` int(11) NOT NULL,
`costing` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `costs`
--
INSERT INTO `costs` (`costId`, `visitId`, `packageId`, `costing`) VALUES
(1, 1, 1, 1450),
(2, 1, 2, 1300),
(3, 1, 3, 1000),
(4, 2, 1, 5300),
(5, 2, 2, 3224),
(6, 2, 3, 1200),
(7, 3, 1, 2700),
(8, 3, 2, 2400),
(9, 3, 3, 2000),
(10, 4, 1, 1500),
(11, 4, 2, 1300),
(12, 4, 3, 1000),
(13, 5, 1, 3300),
(14, 5, 2, 2100),
(15, 5, 3, 2000),
(16, 6, 1, 4700),
(17, 6, 2, 4532),
(18, 6, 3, 3999),
(19, 7, 1, 4200),
(20, 7, 2, 3900),
(21, 7, 3, 3900),
(22, 8, 1, 2200),
(23, 8, 2, 1950),
(24, 8, 3, 1500),
(25, 9, 1, 1200),
(26, 9, 2, 1000),
(27, 9, 3, 960);
-- --------------------------------------------------------
--
-- Table structure for table `customers`
--
CREATE TABLE `customers` (
`customerId` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(40) NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`phone` varchar(12) NOT NULL,
`address` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `customers`
--
INSERT INTO `customers` (`customerId`, `username`, `password`, `name`, `email`, `phone`, `address`) VALUES
(1, 'rafsan', 'bcdfc0cdf5040a097b4d4475ad0e2f09db7fbaeb', 'Sadat Hussain', '[email protected]', '012738236', 'Mirpur'),
(2, 'matt', '1fa2ef4755a9226cb9a0a4840bd89b158ac71391', 'Matt Hardy', '[email protected]', '01736362374', 'Dhaka'),
(3, 'lima', '0c1a4b1f895577355377d0143bfb146103215c83', 'lima', '[email protected]', '72862763727', 'Dhaka');
-- --------------------------------------------------------
--
-- Table structure for table `employees`
--
CREATE TABLE `employees` (
`employeeId` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(40) NOT NULL,
`phone` varchar(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `employees`
--
INSERT INTO `employees` (`employeeId`, `username`, `password`, `phone`) VALUES
(1, 'admin', 'd033e22ae348aeb5660fc2140aec35850c4da997', '01705571619'),
(2, 'lima', '40bd001563085fc35165329ea1ff5c5ecbdbbeef', '3423423423');
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`messageId` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`phone` varchar(11) NOT NULL,
`email` varchar(255) NOT NULL,
`message` text NOT NULL,
`datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `messages`
--
INSERT INTO `messages` (`messageId`, `name`, `phone`, `email`, `message`, `datetime`) VALUES
(1, 'Mad Max', '234234', '[email protected]', 'aasdasd', '2016-07-22 10:49:26'),
(2, 'John Cena', '98328374', '[email protected]', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', '2016-07-22 10:49:43'),
(3, 'Rafiq Hariri', '827347328', '[email protected]', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', '2016-07-22 10:42:00'),
(4, 'Zen Hex', '984372367', '[email protected]', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', '2016-07-22 10:42:23');
-- --------------------------------------------------------
--
-- Table structure for table `packages`
--
CREATE TABLE `packages` (
`packageId` int(11) NOT NULL,
`category` varchar(7) NOT NULL,
`transportation` varchar(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `packages`
--
INSERT INTO `packages` (`packageId`, `category`, `transportation`) VALUES
(1, 'Premium', 'Air'),
(2, 'Gold', 'Train'),
(3, 'Silver', 'Bus');
-- --------------------------------------------------------
--
-- Table structure for table `transactions`
--
CREATE TABLE `transactions` (
`transactionId` int(11) NOT NULL,
`customerId` int(11) NOT NULL,
`bank` varchar(255) NOT NULL,
`account_number` varchar(255) NOT NULL,
`datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `transactions`
--
INSERT INTO `transactions` (`transactionId`, `customerId`, `bank`, `account_number`, `datetime`) VALUES
(1, 1, 'ebl', '23123123', '2016-07-20 06:05:42'),
(2, 1, 'ebl', '3642364752763', '2016-07-20 08:37:51');
-- --------------------------------------------------------
--
-- Table structure for table `visits`
--
CREATE TABLE `visits` (
`visitId` int(11) NOT NULL,
`destination` varchar(255) NOT NULL,
`description` text NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`image` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `visits`
--
INSERT INTO `visits` (`visitId`, `destination`, `description`, `active`, `image`) VALUES
(1, 'Dhaka-Chittagong-Dhaka', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 1, 'chittagong.jpg'),
(2, 'Dhaka-Comilla-Dhaka', 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.\r\n\r\nThe standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.', 1, 'comilla.jpg'),
(3, 'Dhaka-Rajshahi-Dhaka', 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using ''Content here, content here'', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for ''lorem ipsum'' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).\r\n', 1, 'rajshahi.jpg'),
(4, 'Dhaka-Sylhet-Dhaka', 'There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don''t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn''t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.', 1, 'sylhet.jpg'),
(5, 'Dhaka-Bogra-Dhaka', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 1, 'bogra.jpg'),
(6, 'Dhaka-Rangpur-Dhaka', 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.\r\n\r\nThe standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.\r\n', 1, 'rangpur.jpg'),
(7, 'Dhaka-Dinajpur-Dhaka', 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using ''Content here, content here'', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for ''lorem ipsum'' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).', 1, 'dinajpur.jpg'),
(8, 'Dhaka-Barishal-Dhaka', 'There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don''t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn''t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.', 1, 'barishal.jpg'),
(9, 'Dhaka-Coxbazar-Dhaka', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 1, 'coxbazar.jpg');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `costs`
--
ALTER TABLE `costs`
ADD PRIMARY KEY (`costId`),
ADD KEY `fk_visit_id_idx` (`visitId`),
ADD KEY `fk_package_id_idx` (`packageId`);
--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
ADD PRIMARY KEY (`customerId`);
--
-- Indexes for table `employees`
--
ALTER TABLE `employees`
ADD PRIMARY KEY (`employeeId`);
--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
ADD PRIMARY KEY (`messageId`);
--
-- Indexes for table `packages`
--
ALTER TABLE `packages`
ADD PRIMARY KEY (`packageId`);
--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
ADD PRIMARY KEY (`transactionId`),
ADD KEY `fk_customer_id_idx` (`customerId`);
--
-- Indexes for table `visits`
--
ALTER TABLE `visits`
ADD PRIMARY KEY (`visitId`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `costs`
--
ALTER TABLE `costs`
MODIFY `costId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;
--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
MODIFY `customerId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `employees`
--
ALTER TABLE `employees`
MODIFY `employeeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
MODIFY `messageId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `packages`
--
ALTER TABLE `packages`
MODIFY `packageId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
MODIFY `transactionId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `visits`
--
ALTER TABLE `visits`
MODIFY `visitId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `costs`
--
ALTER TABLE `costs`
ADD CONSTRAINT `fk_package_id` FOREIGN KEY (`packageId`) REFERENCES `packages` (`packageId`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `fk_visit_id` FOREIGN KEY (`visitId`) REFERENCES `visits` (`visitId`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
ADD CONSTRAINT `fk_customer_id` FOREIGN KEY (`customerId`) REFERENCES `customers` (`customerId`) ON DELETE NO ACTION ON UPDATE NO ACTION;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;