CREATE DATABASE  IF NOT EXISTS `smartmirrordtbs` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `smartmirrordtbs`;
-- MySQL dump 10.13  Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost    Database: smartmirrordtbs
-- ------------------------------------------------------
-- 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 `metingen`
--

DROP TABLE IF EXISTS `metingen`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `metingen` (
  `idMeting` int(11) NOT NULL AUTO_INCREMENT,
  `idSensor` varchar(45) NOT NULL,
  `Waarde` varchar(45) NOT NULL,
  `Tijdstip` datetime NOT NULL,
  PRIMARY KEY (`idMeting`),
  KEY `fk_Metingen_sensor_idx` (`idSensor`),
  CONSTRAINT `fk_Metingen_sensor` FOREIGN KEY (`idSensor`) REFERENCES `sensor` (`idSensor`)
) ENGINE=InnoDB AUTO_INCREMENT=171 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `metingen`
--

LOCK TABLES `metingen` WRITE;
/*!40000 ALTER TABLE `metingen` DISABLE KEYS */;
INSERT INTO `metingen` VALUES (121,'3','0','2019-05-27 02:38:35'),(122,'4','2467','2019-05-27 04:02:22'),(123,'2','96','2019-05-27 05:47:34'),(124,'2','90','2019-05-27 07:16:43'),(125,'2','55','2019-05-27 09:11:16'),(126,'3','0','2019-05-27 13:24:21'),(127,'2','62','2019-05-27 16:27:07'),(128,'4','941','2019-05-27 16:42:23'),(129,'1','23','2019-05-27 20:55:26'),(130,'4','4455','2019-05-27 23:47:54'),(131,'2','52','2019-05-27 23:51:33'),(132,'4','1183','2019-05-28 02:14:42'),(133,'1','23','2019-05-28 02:43:05'),(134,'2','62','2019-05-28 05:04:07'),(135,'4','3548','2019-05-28 05:39:47'),(136,'2','79','2019-05-28 06:16:48'),(137,'4','2615','2019-05-28 09:17:46'),(138,'3','1','2019-05-28 13:23:15'),(139,'2','77','2019-05-28 13:30:01'),(140,'2','63','2019-05-28 18:44:57'),(141,'4','2027','2019-05-28 22:16:25'),(142,'3','0','2019-05-28 22:20:31'),(143,'1','20','2019-05-29 01:29:34'),(144,'3','1','2019-05-29 01:47:12'),(145,'4','1784','2019-05-29 03:24:31'),(146,'4','3110','2019-05-29 05:09:40'),(147,'2','96','2019-05-29 07:37:20'),(148,'4','264','2019-05-29 12:15:38'),(149,'2','75','2019-05-29 12:25:40'),(150,'2','51','2019-05-29 12:45:52'),(151,'2','78','2019-05-29 18:15:27'),(152,'3','0','2019-05-30 01:43:44'),(153,'4','3100','2019-05-30 01:44:11'),(154,'4','2449','2019-05-30 02:37:55'),(155,'1','22','2019-05-30 04:37:49'),(156,'1','22','2019-05-30 08:30:26'),(157,'3','1','2019-05-30 08:50:03'),(158,'4','2744','2019-05-30 08:50:15'),(159,'3','1','2019-05-30 16:14:23'),(160,'3','0','2019-05-30 17:12:59'),(161,'1','19','2019-05-30 20:15:04'),(162,'4','2161','2019-05-30 21:37:54'),(163,'1','18','2019-05-31 01:21:32'),(164,'2','90','2019-05-31 04:47:58'),(165,'3','1','2019-05-31 08:15:11'),(166,'1','21','2019-05-31 09:50:13'),(167,'1','21','2019-05-31 12:44:59'),(168,'4','745','2019-05-31 15:51:38'),(169,'2','86','2019-05-31 17:04:10'),(170,'3','1','2019-05-31 23:40:59');
/*!40000 ALTER TABLE `metingen` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sensor`
--

DROP TABLE IF EXISTS `sensor`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
 SET character_set_client = utf8mb4 ;
CREATE TABLE `sensor` (
  `idSensor` varchar(45) NOT NULL,
  `Description` varchar(45) NOT NULL,
  `Name` varchar(45) DEFAULT NULL,
  `Maateenheid` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`idSensor`),
  UNIQUE KEY `idEntry_UNIQUE` (`idSensor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sensor`
--

LOCK TABLES `sensor` WRITE;
/*!40000 ALTER TABLE `sensor` DISABLE KEYS */;
INSERT INTO `sensor` VALUES ('1','Temperatuur sensor','DHTL11','°C'),('2','Humidity Sensor','DHTL11','%'),('3','Bewegingssensor','PIR',NULL),('4','Licht Sensor','TSL2561','lux');
/*!40000 ALTER TABLE `sensor` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping events for database 'smartmirrordtbs'
--

--
-- Dumping routines for database 'smartmirrordtbs'
--
/*!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-05-28 15:35:19
