CREATE DATABASE  IF NOT EXISTS `smartbackpack` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `smartbackpack`;
-- MySQL dump 10.13  Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost    Database: smartbackpack
-- ------------------------------------------------------
-- Server version	8.0.15

/*!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 */;
 SET NAMES utf8 ;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `historiek`
--

DROP TABLE IF EXISTS `historiek`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `historiek` (
  `idhistoriek` int(11) NOT NULL AUTO_INCREMENT,
  `tijdstip` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `idsensor` int(11) NOT NULL,
  `waarde1` varchar(45) NOT NULL,
  `waarde2` varchar(45) DEFAULT NULL,
  `waarde3` varchar(45) DEFAULT NULL,
  `uid` char(12) DEFAULT NULL,
  PRIMARY KEY (`idhistoriek`),
  KEY `fk_historiek_sensors1_idx` (`idsensor`),
  KEY `sensor` (`idsensor`),
  KEY `fk_historiek_object1_idx` (`uid`),
  CONSTRAINT `fk_historiek_object1` FOREIGN KEY (`uid`) REFERENCES `object` (`uid`),
  CONSTRAINT `fk_historiek_sensors1` FOREIGN KEY (`idsensor`) REFERENCES `sensors` (`idsensor`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `historiek`
--

LOCK TABLES `historiek` WRITE;
/*!40000 ALTER TABLE `historiek` DISABLE KEYS */;
INSERT INTO `historiek` VALUES (1,'2020-02-15 10:25:05',1,'5','8','10',NULL),(2,'2018-06-17 22:30:24',1,'5','10','0',NULL),(3,'2019-06-30 01:42:51',1,'5','0','4',NULL),(4,'2018-12-18 21:35:36',1,'0','2','2',NULL),(5,'2018-06-14 04:09:19',1,'0','5','7',NULL),(6,'2019-02-28 01:26:46',1,'9','5','5',NULL),(7,'2019-11-08 18:00:33',1,'9','5','7',NULL),(8,'2020-01-08 14:18:26',1,'4','2','5',NULL),(9,'2019-01-16 21:34:18',1,'3','2','2',NULL),(10,'2020-01-11 05:04:30',1,'3','3','1',NULL),(11,'2019-09-28 23:23:09',1,'4','10','10',NULL),(12,'2018-11-08 10:01:34',1,'2','7','8',NULL),(13,'2020-04-05 04:36:09',1,'7','1','5',NULL),(14,'2018-09-08 10:10:12',1,'1','1','3',NULL),(15,'2019-04-30 07:58:56',1,'2','7','3',NULL),(16,'2019-01-24 06:33:53',1,'9','5','5',NULL),(17,'2020-05-14 18:48:30',1,'2','5','8',NULL),(18,'2020-04-28 17:11:55',1,'6','5','2',NULL),(19,'2020-05-01 10:07:03',1,'8','0','7',NULL),(20,'2019-03-21 06:57:43',1,'0','1','0',NULL),(21,'2019-10-07 16:40:38',2,'178606','Chaney',NULL,NULL),(22,'2018-12-22 11:50:24',2,'269955','Levi',NULL,NULL),(23,'2019-10-27 12:49:39',2,'205364','Plato',NULL,NULL),(24,'2019-07-09 09:46:20',2,'499925','Alyssa',NULL,NULL),(25,'2018-06-15 19:41:38',2,'437579','Kadeem',NULL,NULL),(26,'2018-12-15 19:43:31',2,'239848','Levi',NULL,NULL),(27,'2018-06-14 07:13:47',2,'348288','Clementine',NULL,NULL),(28,'2019-07-22 21:36:54',2,'360317','Katell',NULL,NULL),(29,'2018-10-28 03:52:15',2,'319805','Violet',NULL,NULL),(30,'2020-01-30 14:35:19',2,'96999','Cleo',NULL,NULL),(31,'2019-09-08 00:10:59',2,'225941','Stephen',NULL,NULL),(32,'2019-11-08 22:00:53',2,'9297','Evangeline',NULL,NULL),(33,'2018-09-13 12:28:02',2,'186411','Jordan',NULL,NULL),(34,'2018-07-15 09:52:50',2,'284120','Neil',NULL,NULL),(35,'2020-03-13 16:59:25',2,'292799','McKenzie',NULL,NULL),(36,'2019-08-29 09:23:12',2,'29989','Elton',NULL,NULL),(37,'2020-03-13 06:04:21',2,'201356','Mallory',NULL,NULL),(38,'2019-10-08 00:06:02',2,'282778','Colton',NULL,NULL),(39,'2019-03-17 11:16:12',2,'187612','Ocean',NULL,NULL),(40,'2018-11-18 16:24:50',2,'30702','Patricia',NULL,NULL),(41,'2019-10-17 22:35:51',3,'13',NULL,NULL,NULL),(42,'2018-12-31 23:31:53',3,'5',NULL,NULL,NULL),(43,'2018-12-06 11:19:39',3,'11',NULL,NULL,NULL),(44,'2019-06-04 04:11:20',3,'9',NULL,NULL,NULL),(45,'2018-08-30 17:19:03',3,'0',NULL,NULL,NULL),(46,'2018-08-27 17:44:24',3,'2',NULL,NULL,NULL),(47,'2018-10-02 15:17:36',3,'11',NULL,NULL,NULL),(48,'2018-12-19 04:41:02',3,'11',NULL,NULL,NULL),(49,'2019-08-05 06:15:02',3,'2',NULL,NULL,NULL),(50,'2019-06-13 23:50:59',3,'3',NULL,NULL,NULL),(51,'2020-05-07 23:00:35',3,'11',NULL,NULL,NULL),(52,'2019-07-23 20:08:40',3,'1',NULL,NULL,NULL),(53,'2018-05-31 22:33:09',3,'2',NULL,NULL,NULL),(54,'2018-07-27 20:49:07',3,'5',NULL,NULL,NULL),(55,'2018-08-20 13:23:44',3,'1',NULL,NULL,NULL),(56,'2018-12-25 17:01:37',3,'1',NULL,NULL,NULL),(57,'2019-05-14 08:43:18',3,'11',NULL,NULL,NULL),(58,'2019-02-26 09:24:40',3,'15',NULL,NULL,NULL),(59,'2020-02-04 06:01:42',3,'13',NULL,NULL,NULL),(60,'2018-06-15 08:40:57',3,'13',NULL,NULL,NULL);
/*!40000 ALTER TABLE `historiek` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `lijst`
--

DROP TABLE IF EXISTS `lijst`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `lijst` (
  `idlijst` int(11) NOT NULL AUTO_INCREMENT,
  `naam` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`idlijst`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `lijst`
--

LOCK TABLES `lijst` WRITE;
/*!40000 ALTER TABLE `lijst` DISABLE KEYS */;
INSERT INTO `lijst` VALUES (1,'maandag school'),(2,'zaterdag scouts'),(3,'sleepover'),(4,'schooldag'),(5,'fitness');
/*!40000 ALTER TABLE `lijst` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `lijst_has_object`
--

DROP TABLE IF EXISTS `lijst_has_object`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `lijst_has_object` (
  `lijst_idlijst` int(11) NOT NULL,
  `object_idobject` int(11) NOT NULL,
  PRIMARY KEY (`lijst_idlijst`,`object_idobject`),
  KEY `fk_lijst_has_object_object1_idx` (`object_idobject`),
  KEY `fk_lijst_has_object_lijst_idx` (`lijst_idlijst`),
  CONSTRAINT `fk_lijst_has_object_lijst` FOREIGN KEY (`lijst_idlijst`) REFERENCES `lijst` (`idlijst`),
  CONSTRAINT `fk_lijst_has_object_object1` FOREIGN KEY (`object_idobject`) REFERENCES `object` (`idobject`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `lijst_has_object`
--

LOCK TABLES `lijst_has_object` WRITE;
/*!40000 ALTER TABLE `lijst_has_object` DISABLE KEYS */;
INSERT INTO `lijst_has_object` VALUES (1,1),(3,1),(4,1),(1,2),(5,3),(3,4),(1,5),(4,5),(2,6);
/*!40000 ALTER TABLE `lijst_has_object` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `object`
--

DROP TABLE IF EXISTS `object`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `object` (
  `idobject` int(11) NOT NULL AUTO_INCREMENT,
  `uid` char(12) DEFAULT NULL,
  `naam` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`idobject`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `object`
--

LOCK TABLES `object` WRITE;
/*!40000 ALTER TABLE `object` DISABLE KEYS */;
INSERT INTO `object` VALUES (1,'1655411568','laptop'),(2,'8976513254','boterhamdoos'),(3,'731569887','sportschoenen'),(4,'1352672159','slaapzak'),(5,'231547865923','raspberry pi'),(6,'568456123','scoutshemd');
/*!40000 ALTER TABLE `object` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sensors`
--

DROP TABLE IF EXISTS `sensors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `sensors` (
  `idsensor` int(11) NOT NULL AUTO_INCREMENT,
  `sensorNaam` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`idsensor`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sensors`
--

LOCK TABLES `sensors` WRITE;
/*!40000 ALTER TABLE `sensors` DISABLE KEYS */;
INSERT INTO `sensors` VALUES (1,'accelerometer'),(2,'rfid reader'),(3,'hall-sensor');
/*!40000 ALTER TABLE `sensors` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping events for database 'smartbackpack'
--

--
-- Dumping routines for database 'smartbackpack'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2019-06-03 10:32:58
