· 8 years ago · Mar 06, 2018, 12:50 PM
1-- MySQL dump 10.13 Distrib 5.5.9, for Win32 (x86)
2--
3-- Host: localhost Database: proyectorestaurante
4-- ------------------------------------------------------
5-- Server version 5.5.14
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Current Database: `proyectorestaurante`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `jamear` /*!40100 DEFAULT CHARACTER SET latin1 */;
23
24USE `jamear`;
25
26--
27-- Table structure for table `direccion`
28--
29
30DROP TABLE IF EXISTS `direccion`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `direccion` (
34 `idDireccion` int(11) NOT NULL,
35 `latitud` bigint(20) DEFAULT NULL,
36 `longitud` bigint(20) DEFAULT NULL,
37 `distrito` varchar(45) DEFAULT NULL,
38 `calle` varchar(45) DEFAULT NULL,
39 `manzana` varchar(45) DEFAULT NULL,
40 `lote` varchar(45) DEFAULT NULL,
41 `avenida` varchar(45) DEFAULT NULL,
42 `Restaurante_idRestaurante` int(11) NOT NULL,
43 PRIMARY KEY (`idDireccion`,`Restaurante_idRestaurante`),
44 KEY `fk_Direccion_Restaurante` (`Restaurante_idRestaurante`),
45 CONSTRAINT `fk_Direccion_Restaurante` FOREIGN KEY (`Restaurante_idRestaurante`) REFERENCES `restaurante` (`idRestaurante`) ON DELETE NO ACTION ON UPDATE NO ACTION
46) ENGINE=InnoDB DEFAULT CHARSET=latin1;
47/*!40101 SET character_set_client = @saved_cs_client */;
48
49--
50-- Dumping data for table `direccion`
51--
52
53LOCK TABLES `direccion` WRITE;
54/*!40000 ALTER TABLE `direccion` DISABLE KEYS */;
55/*!40000 ALTER TABLE `direccion` ENABLE KEYS */;
56UNLOCK TABLES;
57
58--
59-- Table structure for table `menu`
60--
61
62DROP TABLE IF EXISTS `menu`;
63/*!40101 SET @saved_cs_client = @@character_set_client */;
64/*!40101 SET character_set_client = utf8 */;
65CREATE TABLE `menu` (
66 `idMenu` int(11) NOT NULL,
67 `entrada` varchar(100) DEFAULT NULL,
68 `segundo` varchar(100) DEFAULT NULL,
69 `postre` varchar(100) DEFAULT NULL,
70 `precio` double DEFAULT NULL,
71 `votos` int(11) DEFAULT NULL,
72 `Restaurante_idRestaurante` int(11) NOT NULL,
73 PRIMARY KEY (`idMenu`,`Restaurante_idRestaurante`),
74 KEY `fk_Menu_Restaurante1` (`Restaurante_idRestaurante`),
75 CONSTRAINT `fk_Menu_Restaurante1` FOREIGN KEY (`Restaurante_idRestaurante`) REFERENCES `restaurante` (`idRestaurante`) ON DELETE NO ACTION ON UPDATE NO ACTION
76) ENGINE=InnoDB DEFAULT CHARSET=latin1;
77/*!40101 SET character_set_client = @saved_cs_client */;
78
79--
80-- Dumping data for table `menu`
81--
82
83LOCK TABLES `menu` WRITE;
84/*!40000 ALTER TABLE `menu` DISABLE KEYS */;
85/*!40000 ALTER TABLE `menu` ENABLE KEYS */;
86UNLOCK TABLES;
87
88--
89-- Table structure for table `restaurantes`
90--
91
92DROP TABLE IF EXISTS `restaurantes`;
93/*!40101 SET @saved_cs_client = @@character_set_client */;
94/*!40101 SET character_set_client = utf8 */;
95CREATE TABLE `restaurantes` (
96 `idRestaurante` int(11) NOT NULL AUTO_INCREMENT,
97 `nombre` varchar(100) DEFAULT NULL,
98 `ruc` bigint(20) DEFAULT NULL,
99 `email` varchar(200) not null,
100 `password` varchar(20) not null,
101 PRIMARY KEY (`idRestaurante`)
102) ENGINE=InnoDB DEFAULT CHARSET=latin1;
103/*!40101 SET character_set_client = @saved_cs_client */;
104
105--
106-- Dumping data for table `restaurantes`
107--
108
109LOCK TABLES `restaurantes` WRITE;
110/*!40000 ALTER TABLE `restaurantes` DISABLE KEYS */;
111/*!40000 ALTER TABLE `restaurantes` ENABLE KEYS */;
112UNLOCK TABLES;
113/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
114
115/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
116/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
117/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
118/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
119/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
120/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
121/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
122
123-- Dump completed on 2011-11-05 0:39:31
124
125select * from restaurantes;