-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server Version: 5.1.53-community - MySQL Community Server (GPL) -- Server Betriebssystem: Win64 -- HeidiSQL Version: 8.0.0.4396 -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!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' */; -- Exportiere Datenbank Struktur fuer restaurantguide CREATE DATABASE IF NOT EXISTS `restaurantguide` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `restaurantguide`; -- Exportiere Struktur von Tabelle restaurantguide.category DROP TABLE IF EXISTS `category`; CREATE TABLE IF NOT EXISTS `category` ( `id` bigint(20) NOT NULL, `description` varchar(3000) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.category: ~1 rows DELETE FROM `category`; /*!40000 ALTER TABLE `category` DISABLE KEYS */; INSERT INTO `category` (`id`, `description`, `name`) VALUES (1, 'Fresh Burgers, Fries and Drinks to go', 'Fast Food'); /*!40000 ALTER TABLE `category` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.country DROP TABLE IF EXISTS `country`; CREATE TABLE IF NOT EXISTS `country` ( `id` bigint(20) NOT NULL, `iso3` varchar(3) COLLATE utf8_unicode_ci NOT NULL, `iso_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `numcode` varchar(3) COLLATE utf8_unicode_ci NOT NULL, `printable_name` varchar(80) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.country: ~2 rows DELETE FROM `country`; /*!40000 ALTER TABLE `country` DISABLE KEYS */; INSERT INTO `country` (`id`, `iso3`, `iso_code`, `name`, `numcode`, `printable_name`) VALUES (1, 'USA', 'US', 'United States Of America', '840', 'United States Of America'), (2, 'DEU', 'DE', 'BRD', '276', 'Bundesrepublik Deutschland'); /*!40000 ALTER TABLE `country` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.phone_contact DROP TABLE IF EXISTS `phone_contact`; CREATE TABLE IF NOT EXISTS `phone_contact` ( `id` bigint(20) NOT NULL, `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `phoneNumber` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `restaurant_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `FKluslquv0ypst68k14v3c0g82m` (`restaurant_id`), CONSTRAINT `FKluslquv0ypst68k14v3c0g82m` FOREIGN KEY (`restaurant_id`) REFERENCES `restaurant` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.phone_contact: ~0 rows DELETE FROM `phone_contact`; /*!40000 ALTER TABLE `phone_contact` DISABLE KEYS */; /*!40000 ALTER TABLE `phone_contact` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.recommendation DROP TABLE IF EXISTS `recommendation`; CREATE TABLE IF NOT EXISTS `recommendation` ( `id` bigint(20) NOT NULL, `description` varchar(5000) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `ranking_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `guest_id` bigint(20) NOT NULL, `restaurant_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `FK3ob4jv3oyy4339lxarv1rtyav` (`guest_id`), KEY `FKcfq4o0edbpnh6sgwkptsoueq4` (`restaurant_id`), CONSTRAINT `FKcfq4o0edbpnh6sgwkptsoueq4` FOREIGN KEY (`restaurant_id`) REFERENCES `restaurant` (`id`), CONSTRAINT `FK3ob4jv3oyy4339lxarv1rtyav` FOREIGN KEY (`guest_id`) REFERENCES `registered_customer` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.recommendation: ~1 rows DELETE FROM `recommendation`; /*!40000 ALTER TABLE `recommendation` DISABLE KEYS */; INSERT INTO `recommendation` (`id`, `description`, `name`, `ranking_type`, `guest_id`, `restaurant_id`) VALUES (1, 'Super fresh burgers, hot fries and cool drinks in minutes to go', 'Top Burger Restaurant', 'EXCELLENT', 1, 1); /*!40000 ALTER TABLE `recommendation` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.registered_customer DROP TABLE IF EXISTS `registered_customer`; CREATE TABLE IF NOT EXISTS `registered_customer` ( `id` bigint(20) NOT NULL, `aliasName` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `login` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(256) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.registered_customer: ~1 rows DELETE FROM `registered_customer`; /*!40000 ALTER TABLE `registered_customer` DISABLE KEYS */; INSERT INTO `registered_customer` (`id`, `aliasName`, `email`, `login`, `password`) VALUES (1, 'Fast Food Gourmet', 'gourmet@restaurants.com', 'gourmets', 'restaurantfinder1234567'); /*!40000 ALTER TABLE `registered_customer` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.restaurant DROP TABLE IF EXISTS `restaurant`; CREATE TABLE IF NOT EXISTS `restaurant` ( `id` bigint(20) NOT NULL, `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `street1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `street2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dressCode` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `linkGooglemaps` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, `linkMenu` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, `location` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `website` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL, `country_id` bigint(20) DEFAULT NULL, `category_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `FKsd2o0w0nxy7xn0cvr9dkrtdvf` (`country_id`), KEY `FK8jj0ghjhpw9xiue5pkqxb67s7` (`category_id`), CONSTRAINT `FK8jj0ghjhpw9xiue5pkqxb67s7` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`), CONSTRAINT `FKsd2o0w0nxy7xn0cvr9dkrtdvf` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.restaurant: ~1 rows DELETE FROM `restaurant`; /*!40000 ALTER TABLE `restaurant` DISABLE KEYS */; INSERT INTO `restaurant` (`id`, `city`, `state`, `street1`, `street2`, `zip_code`, `dressCode`, `linkGooglemaps`, `linkMenu`, `location`, `name`, `website`, `country_id`, `category_id`) VALUES (1, 'Duesseldorf', 'NRW', 'Hunsrueckenstr. 33', NULL, '40213 ', 'Any', 'http://91.250.116.208/anfahrt-duesseldorf-altstadt.html', NULL, 'Altstadt', 'Burger King', 'www.burgerking.com', 2, 1); /*!40000 ALTER TABLE `restaurant` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.sequence_category DROP TABLE IF EXISTS `sequence_category`; CREATE TABLE IF NOT EXISTS `sequence_category` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.sequence_category: ~1 rows DELETE FROM `sequence_category`; /*!40000 ALTER TABLE `sequence_category` DISABLE KEYS */; INSERT INTO `sequence_category` (`next_val`) VALUES (2); /*!40000 ALTER TABLE `sequence_category` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.sequence_country DROP TABLE IF EXISTS `sequence_country`; CREATE TABLE IF NOT EXISTS `sequence_country` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.sequence_country: ~1 rows DELETE FROM `sequence_country`; /*!40000 ALTER TABLE `sequence_country` DISABLE KEYS */; INSERT INTO `sequence_country` (`next_val`) VALUES (3); /*!40000 ALTER TABLE `sequence_country` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.sequence_phone_contact DROP TABLE IF EXISTS `sequence_phone_contact`; CREATE TABLE IF NOT EXISTS `sequence_phone_contact` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.sequence_phone_contact: ~1 rows DELETE FROM `sequence_phone_contact`; /*!40000 ALTER TABLE `sequence_phone_contact` DISABLE KEYS */; INSERT INTO `sequence_phone_contact` (`next_val`) VALUES (1); /*!40000 ALTER TABLE `sequence_phone_contact` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.sequence_recommendation DROP TABLE IF EXISTS `sequence_recommendation`; CREATE TABLE IF NOT EXISTS `sequence_recommendation` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.sequence_recommendation: ~1 rows DELETE FROM `sequence_recommendation`; /*!40000 ALTER TABLE `sequence_recommendation` DISABLE KEYS */; INSERT INTO `sequence_recommendation` (`next_val`) VALUES (2); /*!40000 ALTER TABLE `sequence_recommendation` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.sequence_registered_customer DROP TABLE IF EXISTS `sequence_registered_customer`; CREATE TABLE IF NOT EXISTS `sequence_registered_customer` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.sequence_registered_customer: ~1 rows DELETE FROM `sequence_registered_customer`; /*!40000 ALTER TABLE `sequence_registered_customer` DISABLE KEYS */; INSERT INTO `sequence_registered_customer` (`next_val`) VALUES (2); /*!40000 ALTER TABLE `sequence_registered_customer` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.sequence_restaurant DROP TABLE IF EXISTS `sequence_restaurant`; CREATE TABLE IF NOT EXISTS `sequence_restaurant` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.sequence_restaurant: ~1 rows DELETE FROM `sequence_restaurant`; /*!40000 ALTER TABLE `sequence_restaurant` DISABLE KEYS */; INSERT INTO `sequence_restaurant` (`next_val`) VALUES (2); /*!40000 ALTER TABLE `sequence_restaurant` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.sequence_times_of_service DROP TABLE IF EXISTS `sequence_times_of_service`; CREATE TABLE IF NOT EXISTS `sequence_times_of_service` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.sequence_times_of_service: ~1 rows DELETE FROM `sequence_times_of_service`; /*!40000 ALTER TABLE `sequence_times_of_service` DISABLE KEYS */; INSERT INTO `sequence_times_of_service` (`next_val`) VALUES (2); /*!40000 ALTER TABLE `sequence_times_of_service` ENABLE KEYS */; -- Exportiere Struktur von Tabelle restaurantguide.times_of_service DROP TABLE IF EXISTS `times_of_service`; CREATE TABLE IF NOT EXISTS `times_of_service` ( `id` bigint(20) NOT NULL, `days` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `endTime` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `startTime` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `restaurant_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `FKslwqm2c0qjia6fcimn04179oa` (`restaurant_id`), CONSTRAINT `FKslwqm2c0qjia6fcimn04179oa` FOREIGN KEY (`restaurant_id`) REFERENCES `restaurant` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle restaurantguide.times_of_service: ~1 rows DELETE FROM `times_of_service`; /*!40000 ALTER TABLE `times_of_service` DISABLE KEYS */; INSERT INTO `times_of_service` (`id`, `days`, `endTime`, `startTime`, `restaurant_id`) VALUES (1, 'Mo-Sun', '04:00 AM', '05:00 AM', 1); /*!40000 ALTER TABLE `times_of_service` ENABLE KEYS */; /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;