-- phpMyAdmin SQL Dump
-- version 3.3.9.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 28, 2011 at 01:46 AM
-- Server version: 5.1.56
-- PHP Version: 5.2.9
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: `btohcr_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, '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=9 ;
--
-- 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),
(4, 2, 'Tacos Papalote', 'Tacos', 99.99),
(5, 7, 'Cheeseburguer', 'hamburguesa', 83.33);
-- --------------------------------------------------------
--
-- 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,
`fechaRegistro` date NOT NULL,
PRIMARY KEY (`idRest`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;
--
-- Dumping data for table `restaurantes`
--
INSERT INTO `restaurantes` (`idRest`, `nombre`, `categoria`, `direccion`, `telefono`, `descripcion`, `fechaRegistro`) VALUES
(1, 'La Taquiza', 'mexicano', 'Juarez 222, Monterrey, NL', '88833355', 'En este restaurante vas a encontrar diversas cazuelas y muchos tacos! de seguro algunos van a ser de tu agrado, y sabemos que vas a querer volver.', '2001-10-10'),
(2, 'El Papalote', 'TexMex', 'Avenida Laredo 206, Guadalupe, Nuevo Len, Mexico', '27372727', 'Somos un muy buen restaurante TEXMEX!', '2009-07-06'),
(3, 'El Japon', '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'),
(4, 'La Esquina', 'Comida Rapida', 'Luz 102, Monterrey, NL', '83343344', 'Este restaurante siempre se encuentra cerca de ti, en la esquina!', '2002-02-02'),
(5, 'La Cazuela', 'mexicano', 'Avenida Reforma 888, Col. Centro, Monterrey, NL', '88833355', 'En este restaurante vas a encontrar diversas cazuelas, de seguro alguna va a ser de tu agrado.', '1998-12-12'),
(6, 'El Comal', 'Mexicano', 'Garza Sada 1892, Col. Garza Sada, Monterrey, Mexico', '88833377', 'Hacemos tacos caseros a la orden!', '1990-05-05'),
(7, 'America', 'Internacional', 'Avenida Madero 333, Monterrey, NL', '232323232', 'Desde hamburguesas hasta comida gourmet, te va a gustar.', '1988-03-03'),
(8, 'Las alitas', 'Variado', 'Mississipi 111, San Pedro, NL', '2323323', 'Este es el restaurante de Wingalesio.', '1999-09-03'),
(9, 'Los Arcos', 'Mariscos', 'Morones Prieto 727, Col. Monterrey, Monterrey, NL.', '4545454', 'Este es un restaurante de mariscos fabuloso.', '1992-05-06'),
(10, 'Pollo Loco', 'Comida Rapida', 'Avenida Lazaro Cardenas 898, Monterrey, NL', '89348333', 'Este es un restaurante de pollo asado.', '2003-10-10'),
(11, 'Muelle 18', 'Mariscos', 'Ave. Fleteros 232, Monterrey, NL', '8454544666', 'Este es un restaurante de mariscos que siempre tiene mucha gente y muy buen servicio.', '1997-07-05'),
(14, 'La Luz', 'taqueria', 'Avenida nu, 102, Monterrey, NL', '2323554', 'Esta es una deliciosa taqueria del centro de Monterrey.', '2011-04-28');
-- --------------------------------------------------------
--
-- 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=17 ;
--
-- 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.'),
(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!'),
(11, 2, NULL, 11, 'Com', 'Entario.'),
(12, 2, NULL, 20, 'Raul Esparza', 'comentaro'),
(13, 2, NULL, 0, 'dd', 'SELECT '' FROM " '' " WHERE '' '' '' '),
(14, 2, NULL, 1001, '11111', 'woooooo'),
(15, 2, NULL, 0, '', ' '),
(16, 1, NULL, 77, 'Eduardo', ' DELICIOSO!');
-- --------------------------------------------------------
--
-- 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`);