· 9 years ago · Dec 09, 2016, 11:34 PM
1CREATE DATABASE IF NOT EXISTS `db_bas` /*!40100 DEFAULT CHARACTER SET utf8 */;
2USE `db_bas`;
3-- MySQL dump 10.13 Distrib 5.7.12, for Win32 (AMD64)
4--
5-- Host: localhost Database: db_bas
6-- ------------------------------------------------------
7-- Server version 5.7.16-log
8
9/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
10/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
11/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
12/*!40101 SET NAMES utf8 */;
13/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
14/*!40103 SET TIME_ZONE='+00:00' */;
15/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
16/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
17/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
18/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
19
20--
21-- Table structure for table `tbl_accounts`
22--
23
24DROP TABLE IF EXISTS `tbl_accounts`;
25/*!40101 SET @saved_cs_client = @@character_set_client */;
26/*!40101 SET character_set_client = utf8 */;
27CREATE TABLE `tbl_accounts` (
28 `accountID` int(11) NOT NULL AUTO_INCREMENT,
29 `idFunction` int(11) NOT NULL,
30 `firstName` varchar(45) DEFAULT NULL,
31 `lastName` varchar(45) NOT NULL,
32 `gender` char(1) DEFAULT NULL,
33 `email` varchar(150) NOT NULL,
34 `password` varchar(25) NOT NULL,
35 `isActive` tinyint(1) NOT NULL,
36 PRIMARY KEY (`accountID`),
37 KEY `fk_functions_idx` (`idFunction`),
38 CONSTRAINT `fk_functions` FOREIGN KEY (`idFunction`) REFERENCES `tbl_functions` (`functionID`) ON DELETE NO ACTION ON UPDATE NO ACTION
39) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
40/*!40101 SET character_set_client = @saved_cs_client */;
41
42--
43-- Dumping data for table `tbl_accounts`
44--
45
46LOCK TABLES `tbl_accounts` WRITE;
47/*!40000 ALTER TABLE `tbl_accounts` DISABLE KEYS */;
48INSERT INTO `tbl_accounts` VALUES (1,1,'John','Wick','M','admin','admin',1),(2,2,'Stella','Jackson','V','manager','manager',1),(3,3,'Steve','Jobs','M','balie','balie',1),(4,3,'balie','balie','M','balie','balie',1),(5,3,'Ter','Hawel','V','terhawel123@hotmail.com','123terhawel456',1);
49/*!40000 ALTER TABLE `tbl_accounts` ENABLE KEYS */;
50UNLOCK TABLES;
51
52--
53-- Table structure for table `tbl_adressen`
54--
55
56DROP TABLE IF EXISTS `tbl_adressen`;
57/*!40101 SET @saved_cs_client = @@character_set_client */;
58/*!40101 SET character_set_client = utf8 */;
59CREATE TABLE `tbl_adressen` (
60 `addressID` int(11) NOT NULL AUTO_INCREMENT,
61 `idLuggage` int(11) DEFAULT NULL,
62 `idCustomer` int(11) NOT NULL,
63 `address` varchar(150) NOT NULL,
64 `postalcode` varchar(10) NOT NULL,
65 `houseNr` int(11) NOT NULL,
66 `houseNrAddition` varchar(2) DEFAULT NULL,
67 `land` varchar(50) NOT NULL,
68 PRIMARY KEY (`addressID`),
69 KEY `fk_luggages_idx` (`idLuggage`),
70 KEY `fk_customers_idx` (`idCustomer`),
71 CONSTRAINT `fk_customers` FOREIGN KEY (`idCustomer`) REFERENCES `tbl_customers` (`customerID`) ON DELETE NO ACTION ON UPDATE NO ACTION,
72 CONSTRAINT `fk_luggages` FOREIGN KEY (`idLuggage`) REFERENCES `tbl_luggages` (`luggageID`) ON DELETE NO ACTION ON UPDATE NO ACTION
73) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
74/*!40101 SET character_set_client = @saved_cs_client */;
75
76--
77-- Dumping data for table `tbl_adressen`
78--
79
80LOCK TABLES `tbl_adressen` WRITE;
81/*!40000 ALTER TABLE `tbl_adressen` DISABLE KEYS */;
82INSERT INTO `tbl_adressen` VALUES (1,NULL,1,'Jakarta straat','1099ZX',22,'','Netherlands'),(2,NULL,3,'Jan biemstraat','1076FG',123,'','Nepal');
83/*!40000 ALTER TABLE `tbl_adressen` ENABLE KEYS */;
84UNLOCK TABLES;
85
86--
87-- Table structure for table `tbl_airport`
88--
89
90DROP TABLE IF EXISTS `tbl_airport`;
91/*!40101 SET @saved_cs_client = @@character_set_client */;
92/*!40101 SET character_set_client = utf8 */;
93CREATE TABLE `tbl_airport` (
94 `airportID` int(11) NOT NULL AUTO_INCREMENT,
95 `address` varchar(150) NOT NULL,
96 `postalcode` varchar(10) NOT NULL,
97 `houseNr` int(11) NOT NULL,
98 `houseNrAddition` varchar(2) DEFAULT NULL,
99 `land` varchar(50) NOT NULL,
100 `code` varchar(45) NOT NULL,
101 `name` varchar(150) NOT NULL,
102 PRIMARY KEY (`airportID`)
103) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
104/*!40101 SET character_set_client = @saved_cs_client */;
105
106--
107-- Dumping data for table `tbl_airport`
108--
109
110LOCK TABLES `tbl_airport` WRITE;
111/*!40000 ALTER TABLE `tbl_airport` DISABLE KEYS */;
112INSERT INTO `tbl_airport` VALUES (1,'Evert van de Beekstraat ','1118 CP',202,NULL,'Netherlands','AMS','Amsterdam Airport Schiphol'),(2,'Dokuz Eylül Mh., Gaziemir/İzmir','35425 ',67,NULL,'Turkey','ADB','Adnan Menderes Airport');
113/*!40000 ALTER TABLE `tbl_airport` ENABLE KEYS */;
114UNLOCK TABLES;
115
116--
117-- Table structure for table `tbl_characteristics`
118--
119
120DROP TABLE IF EXISTS `tbl_characteristics`;
121/*!40101 SET @saved_cs_client = @@character_set_client */;
122/*!40101 SET character_set_client = utf8 */;
123CREATE TABLE `tbl_characteristics` (
124 `characteristicID` int(11) NOT NULL AUTO_INCREMENT,
125 `width` double DEFAULT NULL,
126 `height` double DEFAULT NULL,
127 `depth` double DEFAULT NULL,
128 `color` varchar(45) DEFAULT NULL,
129 `brand` varchar(45) DEFAULT NULL,
130 PRIMARY KEY (`characteristicID`)
131) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
132/*!40101 SET character_set_client = @saved_cs_client */;
133
134--
135-- Dumping data for table `tbl_characteristics`
136--
137
138LOCK TABLES `tbl_characteristics` WRITE;
139/*!40000 ALTER TABLE `tbl_characteristics` DISABLE KEYS */;
140INSERT INTO `tbl_characteristics` VALUES (1,53,42,30,'Black','Gucci'),(11,109,109,109,'Brown','Louis Vouitton'),(13,10,10,10,'Purple','Disney'),(14,89,23,89,'Black','Louis Vouitton');
141/*!40000 ALTER TABLE `tbl_characteristics` ENABLE KEYS */;
142UNLOCK TABLES;
143
144--
145-- Table structure for table `tbl_customers`
146--
147
148DROP TABLE IF EXISTS `tbl_customers`;
149/*!40101 SET @saved_cs_client = @@character_set_client */;
150/*!40101 SET character_set_client = utf8 */;
151CREATE TABLE `tbl_customers` (
152 `customerID` int(11) NOT NULL AUTO_INCREMENT,
153 `firstName` varchar(45) NOT NULL,
154 `lastName` varchar(45) NOT NULL,
155 `sex` char(1) DEFAULT NULL,
156 `email` varchar(150) NOT NULL,
157 `phoneNr` varchar(25) DEFAULT NULL,
158 `mobileNr` varchar(25) DEFAULT NULL,
159 PRIMARY KEY (`customerID`)
160) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
161/*!40101 SET character_set_client = @saved_cs_client */;
162
163--
164-- Dumping data for table `tbl_customers`
165--
166
167LOCK TABLES `tbl_customers` WRITE;
168/*!40000 ALTER TABLE `tbl_customers` DISABLE KEYS */;
169INSERT INTO `tbl_customers` VALUES (1,'Douwe','Egberts','M','sjonnie@hotmail.com','0698574837',''),(2,'Berkan','Serbest','M','sofj@live.nl','0698504983',NULL),(3,'Luna','Lucis Caelum','F','luna@hotmail.com','0685947333',NULL),(4,'LunaFreya','Caelum','F','lunafreya@live.nl','0698547382',NULL),(5,'Benjamin','Test','F','engineer323@hotmail.com','0698547773',NULL),(6,'Teki','Giamo','V','testemail@hotmail.com','0698500098','null'),(7,'Tunak','Tunaktun','F','india@live.com','06985774621',NULL),(8,'Li','Hawek','F','spellen@hotmail.com','',NULL),(9,'Ha','Li','M','Hali211@hotmail.com','0687261123',''),(10,'Haweya','ldflasd','M','serjfgdka@hotmail.com','0698475638','');
170/*!40000 ALTER TABLE `tbl_customers` ENABLE KEYS */;
171UNLOCK TABLES;
172
173--
174-- Table structure for table `tbl_functions`
175--
176
177DROP TABLE IF EXISTS `tbl_functions`;
178/*!40101 SET @saved_cs_client = @@character_set_client */;
179/*!40101 SET character_set_client = utf8 */;
180CREATE TABLE `tbl_functions` (
181 `functionID` int(11) NOT NULL AUTO_INCREMENT,
182 `nameFunction` varchar(100) NOT NULL,
183 PRIMARY KEY (`functionID`)
184) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
185/*!40101 SET character_set_client = @saved_cs_client */;
186
187--
188-- Dumping data for table `tbl_functions`
189--
190
191LOCK TABLES `tbl_functions` WRITE;
192/*!40000 ALTER TABLE `tbl_functions` DISABLE KEYS */;
193INSERT INTO `tbl_functions` VALUES (1,'admin'),(2,'manager'),(3,'baliemedewerker');
194/*!40000 ALTER TABLE `tbl_functions` ENABLE KEYS */;
195UNLOCK TABLES;
196
197--
198-- Table structure for table `tbl_luggages`
199--
200
201DROP TABLE IF EXISTS `tbl_luggages`;
202/*!40101 SET @saved_cs_client = @@character_set_client */;
203/*!40101 SET character_set_client = utf8 */;
204CREATE TABLE `tbl_luggages` (
205 `luggageID` int(11) NOT NULL AUTO_INCREMENT,
206 `idAccount` int(11) NOT NULL,
207 `idStatus` int(11) NOT NULL,
208 `idCharacteristic` int(11) NOT NULL,
209 `idAirport` int(11) NOT NULL,
210 `startDate` date NOT NULL,
211 `endDate` date DEFAULT NULL,
212 `description` longtext,
213 `image` blob,
214 `idCustomer` int(11) DEFAULT NULL,
215 PRIMARY KEY (`luggageID`),
216 KEY `fk_characteristics_idx` (`idCharacteristic`),
217 KEY `fk_airports_idx` (`idAirport`),
218 KEY `fk_statusses_idx` (`idStatus`),
219 KEY `fk_customers2_idx` (`idCustomer`),
220 CONSTRAINT `fk_airports` FOREIGN KEY (`idAirport`) REFERENCES `tbl_airport` (`airportID`) ON DELETE NO ACTION ON UPDATE NO ACTION,
221 CONSTRAINT `fk_characteristics` FOREIGN KEY (`idCharacteristic`) REFERENCES `tbl_characteristics` (`characteristicID`) ON DELETE NO ACTION ON UPDATE NO ACTION,
222 CONSTRAINT `fk_customers2` FOREIGN KEY (`idCustomer`) REFERENCES `tbl_customers` (`customerID`) ON DELETE NO ACTION ON UPDATE NO ACTION,
223 CONSTRAINT `fk_statusses` FOREIGN KEY (`idStatus`) REFERENCES `tbl_statusses` (`statusID`) ON DELETE NO ACTION ON UPDATE NO ACTION
224) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;
225/*!40101 SET character_set_client = @saved_cs_client */;
226
227--
228-- Dumping data for table `tbl_luggages`
229--
230
231LOCK TABLES `tbl_luggages` WRITE;
232/*!40000 ALTER TABLE `tbl_luggages` DISABLE KEYS */;
233INSERT INTO `tbl_luggages` VALUES (1,4,1,1,1,'2015-11-03','2015-12-13','Very old looking, edges are broken.',NULL,1),(15,3,1,11,2,'2016-12-12',NULL,'Alot of stickers on it, stickers of Marvel.',NULL,2),(16,3,1,13,1,'2016-12-12',NULL,'Broken edges, slightly scuffed',NULL,3),(17,3,1,14,1,'2016-12-12',NULL,'Tiny luggage, possibly for a kid',NULL,1);
234/*!40000 ALTER TABLE `tbl_luggages` ENABLE KEYS */;
235UNLOCK TABLES;
236
237--
238-- Table structure for table `tbl_statusses`
239--
240
241DROP TABLE IF EXISTS `tbl_statusses`;
242/*!40101 SET @saved_cs_client = @@character_set_client */;
243/*!40101 SET character_set_client = utf8 */;
244CREATE TABLE `tbl_statusses` (
245 `statusID` int(11) NOT NULL AUTO_INCREMENT,
246 `nameStatus` varchar(100) NOT NULL,
247 PRIMARY KEY (`statusID`)
248) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
249/*!40101 SET character_set_client = @saved_cs_client */;
250
251--
252-- Dumping data for table `tbl_statusses`
253--
254
255LOCK TABLES `tbl_statusses` WRITE;
256/*!40000 ALTER TABLE `tbl_statusses` DISABLE KEYS */;
257INSERT INTO `tbl_statusses` VALUES (1,'open'),(2,'gevonden');
258/*!40000 ALTER TABLE `tbl_statusses` ENABLE KEYS */;
259UNLOCK TABLES;
260/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
261
262/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
263/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
264/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
265/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
266/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
267/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
268/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
269
270-- Dump completed on 2016-12-09 23:38:01