/* Navicat MySQL Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50505 Source Host : localhost Source Database : d020a380 Target Server Type : MySQL Target Server Version : 50505 File Encoding : utf-8 Date: 02/09/2016 12:30:26 PM */ SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for `Aromen` -- ---------------------------- DROP TABLE IF EXISTS `Aromen`; CREATE TABLE `Aromen` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) DEFAULT NULL, `Datum` datetime NOT NULL, `Hersteller_ID` int(11) DEFAULT NULL, `Bewertung_ID` int(11) DEFAULT NULL, PRIMARY KEY (`ID`), KEY `Hersteller` (`Hersteller_ID`), KEY `Bewertung` (`Bewertung_ID`), CONSTRAINT `aromen_ibfk_1` FOREIGN KEY (`Bewertung_ID`) REFERENCES `Bewertungen` (`ID`), CONSTRAINT `aromen_ibfk_2` FOREIGN KEY (`Hersteller_ID`) REFERENCES `Hersteller` (`ID`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of `Aromen` -- ---------------------------- BEGIN; INSERT INTO `Aromen` VALUES ('1', 'Erdbeer', '2016-02-09 12:01:29', '1', '1'); COMMIT; -- ---------------------------- -- Table structure for `Basen` -- ---------------------------- DROP TABLE IF EXISTS `Basen`; CREATE TABLE `Basen` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) DEFAULT NULL, `Datum` datetime NOT NULL, `Hersteller_ID` int(11) DEFAULT NULL, `Bewertung_ID` int(11) DEFAULT NULL, PRIMARY KEY (`ID`), KEY `Hersteller` (`Hersteller_ID`), KEY `Bewertung` (`Bewertung_ID`), CONSTRAINT `Bewertung` FOREIGN KEY (`Bewertung_ID`) REFERENCES `Bewertungen` (`ID`), CONSTRAINT `Hersteller` FOREIGN KEY (`Hersteller_ID`) REFERENCES `Hersteller` (`ID`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of `Basen` -- ---------------------------- BEGIN; INSERT INTO `Basen` VALUES ('1', 'VPG', '2016-02-09 11:43:19', '1', '2'), ('2', 'Traditional', '2016-02-09 12:14:20', '1', '1'); COMMIT; -- ---------------------------- -- Table structure for `Bewertungen` -- ---------------------------- DROP TABLE IF EXISTS `Bewertungen`; CREATE TABLE `Bewertungen` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Wert` float NOT NULL, `Objekt_ID` int(11) NOT NULL, PRIMARY KEY (`ID`), KEY `Objekt` (`Objekt_ID`), CONSTRAINT `Objekt` FOREIGN KEY (`Objekt_ID`) REFERENCES `Objekte` (`ID`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of `Bewertungen` -- ---------------------------- BEGIN; INSERT INTO `Bewertungen` VALUES ('1', '2', '2'), ('2', '2', '2'); COMMIT; -- ---------------------------- -- Table structure for `Hersteller` -- ---------------------------- DROP TABLE IF EXISTS `Hersteller`; CREATE TABLE `Hersteller` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) NOT NULL, `URL` varchar(255) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of `Hersteller` -- ---------------------------- BEGIN; INSERT INTO `Hersteller` VALUES ('1', 'hisvape GmbH', 'http://hisvape.net'); COMMIT; -- ---------------------------- -- Table structure for `Objekte` -- ---------------------------- DROP TABLE IF EXISTS `Objekte`; CREATE TABLE `Objekte` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of `Objekte` -- ---------------------------- BEGIN; INSERT INTO `Objekte` VALUES ('1', 'Aroma'), ('2', 'Base'), ('3', 'PG'), ('4', 'VG'), ('5', 'H2O'), ('6', 'Hersteller'), ('7', 'Benutzer'), ('8', 'Bild'); COMMIT; -- ---------------------------- -- Table structure for `Rezepte` -- ---------------------------- DROP TABLE IF EXISTS `Rezepte`; CREATE TABLE `Rezepte` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) DEFAULT NULL, `Datum` datetime DEFAULT NULL, `User_ID` int(11) DEFAULT NULL, `Base_ID` int(11) DEFAULT NULL, `Bewertung_ID` int(11) DEFAULT NULL, `Reifezeit` int(11) DEFAULT NULL, PRIMARY KEY (`ID`), KEY `Bewertung_ID` (`Bewertung_ID`), KEY `Base_ID` (`Base_ID`), CONSTRAINT `rezepte_ibfk_1` FOREIGN KEY (`Bewertung_ID`) REFERENCES `Bewertungen` (`ID`), CONSTRAINT `rezepte_ibfk_2` FOREIGN KEY (`Base_ID`) REFERENCES `Basen` (`ID`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of `Rezepte` -- ---------------------------- BEGIN; INSERT INTO `Rezepte` VALUES ('1', 'Erdbeer', '2016-02-09 12:00:42', '1', '1', '2', '7'); COMMIT; -- ---------------------------- -- Table structure for `RezepteMischungen` -- ---------------------------- DROP TABLE IF EXISTS `RezepteMischungen`; CREATE TABLE `RezepteMischungen` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Rezept_ID` int(11) NOT NULL, `Aroma_ID` int(11) DEFAULT NULL, PRIMARY KEY (`ID`), KEY `Rezept_ID` (`Rezept_ID`), KEY `Aroma_ID` (`Aroma_ID`), CONSTRAINT `rezeptemischungen_ibfk_1` FOREIGN KEY (`Rezept_ID`) REFERENCES `Rezepte` (`ID`), CONSTRAINT `rezeptemischungen_ibfk_2` FOREIGN KEY (`Aroma_ID`) REFERENCES `Aromen` (`ID`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of `RezepteMischungen` -- ---------------------------- BEGIN; INSERT INTO `RezepteMischungen` VALUES ('1', '1', '1'); COMMIT; SET FOREIGN_KEY_CHECKS = 1;