-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: project_db -- ------------------------------------------------------ -- Server version 8.0.11 /*!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 `devices` -- DROP TABLE IF EXISTS `devices`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `devices` ( `DeviceID` int(11) NOT NULL AUTO_INCREMENT, `Naam` varchar(45) NOT NULL, `Type` varchar(45) NOT NULL, `Beschrijving` varchar(200) NOT NULL, `Status` varchar(45) NOT NULL, PRIMARY KEY (`DeviceID`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `devices` -- LOCK TABLES `devices` WRITE; /*!40000 ALTER TABLE `devices` DISABLE KEYS */; INSERT INTO `devices` VALUES (1,'DS18B20','Sensor','One-wire temperatuur sensor','Aan'),(2,'SEN-14193','Sensor','Lucht kwaliteit sensor','Aan'),(3,'LDR','sensor','Licht sensor','Aan'),(4,'PIR','sensor','Bewegings sensor','Aan'),(5,'DC motor','Actuator','Ventilator','0.3'),(6,'Servo motor','Actuator','Raam open en toe','Dicht'),(7,'Heat pad','Actuator','Verwarming','Uit'),(8,'LCD','Actuator','Weergeven IP adres','Aan'),(9,'RGB led','Actuator','Verlichting','0.5'),(10,'Knop','Actuator','Manuele bediening licht','uit'); /*!40000 ALTER TABLE `devices` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `gebruikers` -- DROP TABLE IF EXISTS `gebruikers`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `gebruikers` ( `GebruikerID` int(11) NOT NULL AUTO_INCREMENT, `Voornaam` varchar(45) NOT NULL, `Achternaam` varchar(45) NOT NULL, `Wachtwoord` varchar(45) NOT NULL, `Emailadres` varchar(45) NOT NULL, PRIMARY KEY (`GebruikerID`) ) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `gebruikers` -- LOCK TABLES `gebruikers` WRITE; /*!40000 ALTER TABLE `gebruikers` DISABLE KEYS */; /*!40000 ALTER TABLE `gebruikers` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `instellingen` -- DROP TABLE IF EXISTS `instellingen`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `instellingen` ( `InstellingID` int(11) NOT NULL AUTO_INCREMENT, `GebruikerID` int(11) NOT NULL, `DeviceID` int(11) NOT NULL, `Meeteenheid` varchar(45) DEFAULT NULL, `Standaardwaarde` float DEFAULT NULL, PRIMARY KEY (`InstellingID`), KEY `fk_Gebruikers_has_Devices_Devices1_idx` (`DeviceID`), KEY `fk_instellingen_gebruikers1_idx` (`GebruikerID`), CONSTRAINT `fk_Gebruikers_has_Devices_Devices1` FOREIGN KEY (`DeviceID`) REFERENCES `devices` (`deviceid`), CONSTRAINT `fk_instellingen_gebruikers1` FOREIGN KEY (`GebruikerID`) REFERENCES `gebruikers` (`gebruikerid`) ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `instellingen` -- LOCK TABLES `instellingen` WRITE; /*!40000 ALTER TABLE `instellingen` DISABLE KEYS */; /*!40000 ALTER TABLE `instellingen` ENABLE KEYS */; UNLOCK TABLES; -- -- 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` ( `MetingID` int(11) NOT NULL AUTO_INCREMENT, `DeviceID` int(11) NOT NULL, `Waarde` int(11) NOT NULL, `Metingstijd` datetime NOT NULL, PRIMARY KEY (`MetingID`), KEY `fk_Historiek_Devices_idx` (`DeviceID`), CONSTRAINT `fk_Historiek_Devices` FOREIGN KEY (`DeviceID`) REFERENCES `devices` (`deviceid`) ) ENGINE=InnoDB AUTO_INCREMENT=3770 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 */; /*!40000 ALTER TABLE `metingen` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `voorkeuren` -- DROP TABLE IF EXISTS `voorkeuren`; /*!40101 SET @saved_cs_client = @@character_set_client */; SET character_set_client = utf8mb4 ; CREATE TABLE `voorkeuren` ( `RoutineID` int(11) NOT NULL AUTO_INCREMENT, `Starttijd` time NOT NULL, `Waarde` varchar(45) NOT NULL, `Stoptijd` time NOT NULL, `GebruikerID` int(11) NOT NULL, `DeviceID` int(11) NOT NULL, PRIMARY KEY (`RoutineID`), KEY `fk_Routines_Devices1_idx` (`DeviceID`), CONSTRAINT `fk_Routines_Devices1` FOREIGN KEY (`DeviceID`) REFERENCES `devices` (`deviceid`), CONSTRAINT `fk_voorkeuren_gebruikers1` FOREIGN KEY (`DeviceID`) REFERENCES `gebruikers` (`gebruikerid`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `voorkeuren` -- LOCK TABLES `voorkeuren` WRITE; /*!40000 ALTER TABLE `voorkeuren` DISABLE KEYS */; /*!40000 ALTER TABLE `voorkeuren` ENABLE KEYS */; UNLOCK TABLES; /*!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 2020-06-15 11:31:50