-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 25, 2011 at 06:38 a.m.
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!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 */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `re`
--
-- CREATE DATABASE `xth_7772747_re` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
--
USE `xth_7772747_re`;
-- --------------------------------------------------------
--
-- Table structure for table `ingrediente`
--
CREATE TABLE IF NOT EXISTS `ingrediente` (
`idPlatillo` int(10) unsigned NOT NULL,
`idIngrediente` varchar(45) NOT NULL,
PRIMARY KEY (`idPlatillo`,`idIngrediente`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `ingrediente`
--
INSERT INTO `ingrediente` (`idPlatillo`, `idIngrediente`) VALUES
(1, 'Cebolla'),
(1, 'Frijoles'),
(1, 'Res'),
(2, 'Cerdo'),
(3, 'Pollo');
-- --------------------------------------------------------
--
-- Table structure for table `platillo`
--
CREATE TABLE IF NOT EXISTS `platillo` (
`idPlatillo` int(10) unsigned NOT NULL AUTO_INCREMENT,
`idRest` smallint(5) unsigned NOT NULL,
`nombre` varchar(255) NOT NULL,
`tipo` varchar(50) NOT NULL,
`precio` double(8,2) DEFAULT NULL,
PRIMARY KEY (`idPlatillo`),
KEY `idRest` (`idRest`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `platillo`
--
INSERT INTO `platillo` (`idPlatillo`, `idRest`, `nombre`, `tipo`, `precio`) VALUES
(1, 1, 'Tacos Arrachera', 'Carne Asada', 80.20),
(2, 1, 'Trompada', 'Cerdo', 80.50),
(3, 1, 'Parrillada de Pollo', 'Pollo', 120.00);
-- --------------------------------------------------------
--
-- Table structure for table `restaurantes`
--
CREATE TABLE IF NOT EXISTS `restaurantes` (
`idRest` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`nombre` varchar(255) NOT NULL,
`categoria` varchar(50) NOT NULL,
`direccion` varchar(255) NOT NULL,
`telefono` varchar(20) NOT NULL,
`descripcion` mediumtext NOT NULL,
`fechaApertura` date NOT NULL,
PRIMARY KEY (`idRest`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Dumping data for table `restaurantes`
--
INSERT INTO `restaurantes` (`idRest`, `nombre`, `categoria`, `direccion`, `telefono`, `descripcion`, `fechaApertura`) VALUES
(1, 'La Taquiza', 'Mexicano', 'Avenida Juarez 109, Monterrey, Nuevo Len, Mxico ', '818-445-3344', 'Este restaurante tiene una importante tradicin en la ciudad de monterrey, ya que es historico y esta muy rico, y cuenta con servicio de valet parking y de estacionamiento de refill', '2001-10-10'),
(2, 'El Papalote', 'TexMex', 'Avenida Laredo 206, Guadalupe, Nuevo Len, Mexico', '27372727', 'Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. Este es un muy buen restaurante. ', '2009-07-06'),
(3, 'La Kika Perika', 'Japones', 'Avenida Nipon 28232, Monterrey, Nuevo Leon, Mexico', '828-338-4333', 'Este restaurante es un restaurante japones inspirado en la comida mexicana casera, combinado con influencias orientales. Este restaurante es un restaurante japones inspirado en la comida mexicana casera, combinado con influencias orientales. Este restaurante es un restaurante japones inspirado en la comida mexicana casera, combinado con influencias orientales.', '2004-02-01');
-- --------------------------------------------------------
--
-- Table structure for table `retroalimentacion`
--
CREATE TABLE IF NOT EXISTS `retroalimentacion` (
`idRetro` int(10) unsigned NOT NULL AUTO_INCREMENT,
`idRest` smallint(5) unsigned NOT NULL,
`idUsuario` smallint(5) unsigned DEFAULT NULL,
`calificacion` smallint(5) unsigned NOT NULL,
`Nombre` varchar(255) NOT NULL,
`comentarios` mediumtext NOT NULL,
PRIMARY KEY (`idRetro`),
KEY `idRest` (`idRest`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
--
-- Dumping data for table `retroalimentacion`
--
INSERT INTO `retroalimentacion` (`idRetro`, `idRest`, `idUsuario`, `calificacion`, `Nombre`, `comentarios`) VALUES
(2, 1, NULL, 88, 'Jorge', '100'),
(3, 1, NULL, 90, 'Luis', 'Este es un comentario de texto para retroalimentar al restaurante.'),
(4, 1, NULL, 88, 'hhh', ' ausasuass'),
(5, 1, NULL, 88, 'Alberto', 'La comida me gusto pero el lugar no.'),
(6, 2, NULL, 50, 'Jose', 'La comida llego fria!!!!!'),
(7, 2, NULL, 85, 'Mario', 'La comida tenía buen sazón, aunque no nos atendió bien el mesero.'),
(8, 2, NULL, 89, 'Alberta', 'Me gustaron los tacos, pero las hamburguesas me supieron feas.'),
(9, 3, NULL, 60, 'Americo', ' Nos atendieron muy bien, pero la comida no servía. He comido mejor en otros lugares.'),
(10, 3, NULL, 77, 'Globito', 'Me robaron mi camioneta en este restaurante!');
-- --------------------------------------------------------
--
-- Table structure for table `usuario`
--
CREATE TABLE IF NOT EXISTS `usuario` (
`idUsuario` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`nombre` varchar(255) NOT NULL,
`email` varchar(128) NOT NULL,
`contrasena` varchar(64) NOT NULL,
PRIMARY KEY (`idUsuario`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `usuario`
--
--
-- Constraints for dumped tables
--
--
-- Constraints for table `ingrediente`
--
ALTER TABLE `ingrediente`
ADD CONSTRAINT `ingrediente_ibfk_1` FOREIGN KEY (`idPlatillo`) REFERENCES `platillo` (`idPlatillo`);
--
-- Constraints for table `platillo`
--
ALTER TABLE `platillo`
ADD CONSTRAINT `platillo_ibfk_1` FOREIGN KEY (`idRest`) REFERENCES `restaurantes` (`idRest`);
--
-- Constraints for table `retroalimentacion`
--
ALTER TABLE `retroalimentacion`
ADD CONSTRAINT `retroalimentacion_ibfk_1` FOREIGN KEY (`idRest`) REFERENCES `restaurantes` (`idRest`);