· 5 years ago · Dec 02, 2020, 04:02 AM
1-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
2--
3-- Host: localhost Database: jurassic_park
4-- ------------------------------------------------------
5-- Server version 8.0.21
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/*!50503 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-- Table structure for table `escuela`
20--
21
22DROP TABLE IF EXISTS `escuela`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!50503 SET character_set_client = utf8mb4 */;
25CREATE TABLE `escuela` (
26 `id` int NOT NULL,
27 `nombre` varchar(80) NOT NULL,
28 `direccion` varchar(120) NOT NULL,
29 PRIMARY KEY (`id`)
30) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
31/*!40101 SET character_set_client = @saved_cs_client */;
32
33--
34-- Dumping data for table `escuela`
35--
36
37LOCK TABLES `escuela` WRITE;
38/*!40000 ALTER TABLE `escuela` DISABLE KEYS */;
39INSERT INTO `escuela` VALUES (1,'Cambridge College Lima','Alameda de los Molinos 728-730'),(2,'Colegio Reyes Rojos','Av. Grau 662'),(3,'Colegio Áleph','Alameda del Remero Lt.5-6, Mz. X'),(4,'Colegio Christa McAuliffe','Jr. Pachacútecn 2169'),(5,'Lima Villa College','Alameda Don Alfonso 125');
40/*!40000 ALTER TABLE `escuela` ENABLE KEYS */;
41UNLOCK TABLES;
42
43--
44-- Table structure for table `guia`
45--
46
47DROP TABLE IF EXISTS `guia`;
48/*!40101 SET @saved_cs_client = @@character_set_client */;
49/*!50503 SET character_set_client = utf8mb4 */;
50CREATE TABLE `guia` (
51 `id` int NOT NULL,
52 `nombre` varchar(20) NOT NULL,
53 `apellido` varchar(25) NOT NULL,
54 `sueldo_hora` varchar(45) NOT NULL,
55 PRIMARY KEY (`id`)
56) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
57/*!40101 SET character_set_client = @saved_cs_client */;
58
59--
60-- Dumping data for table `guia`
61--
62
63LOCK TABLES `guia` WRITE;
64/*!40000 ALTER TABLE `guia` DISABLE KEYS */;
65INSERT INTO `guia` VALUES (1,'NICOLAS','BARRENA FONSECA','10'),(2,'MARCOS','BAQUERO BENAVENTE','10'),(3,'ROSA','CAÑELLAS CABO','10'),(4,'MONTSERRAT','ENCINAS BOUZA','10'),(5,'EUGENIO','JIMENO PLATERO','10');
66/*!40000 ALTER TABLE `guia` ENABLE KEYS */;
67UNLOCK TABLES;
68
69--
70-- Table structure for table `reserva`
71--
72
73DROP TABLE IF EXISTS `reserva`;
74/*!40101 SET @saved_cs_client = @@character_set_client */;
75/*!50503 SET character_set_client = utf8mb4 */;
76CREATE TABLE `reserva` (
77 `id` int NOT NULL,
78 `fechaVisita` date NOT NULL,
79 `horaVisita` time NOT NULL,
80 `Escuela_id` int NOT NULL,
81 PRIMARY KEY (`id`,`Escuela_id`),
82 KEY `escuela_id_idx` (`Escuela_id`),
83 CONSTRAINT `escuela_id` FOREIGN KEY (`Escuela_id`) REFERENCES `escuela` (`id`)
84) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
85/*!40101 SET character_set_client = @saved_cs_client */;
86
87--
88-- Dumping data for table `reserva`
89--
90
91LOCK TABLES `reserva` WRITE;
92/*!40000 ALTER TABLE `reserva` DISABLE KEYS */;
93INSERT INTO `reserva` VALUES (1,'2019-10-15','10:00:00',1),(2,'2019-05-10','14:00:00',3),(3,'2019-10-11','08:00:00',5),(4,'2020-12-16','13:30:00',4),(5,'2020-04-18','10:00:00',2),(6,'2020-05-21','11:30:00',3),(7,'2020-05-24','15:00:00',2),(8,'2020-06-05','09:30:00',1),(9,'2020-07-12','13:00:00',4),(10,'2020-07-17','14:30:00',5);
94/*!40000 ALTER TABLE `reserva` ENABLE KEYS */;
95UNLOCK TABLES;
96
97--
98-- Table structure for table `reserva_grado`
99--
100
101DROP TABLE IF EXISTS `reserva_grado`;
102/*!40101 SET @saved_cs_client = @@character_set_client */;
103/*!50503 SET character_set_client = utf8mb4 */;
104CREATE TABLE `reserva_grado` (
105 `Reserva_TipoVisita_Reserva_id` int NOT NULL,
106 `Reserva_TipoVisita_tipoVisita` int NOT NULL,
107 `grado` varchar(15) NOT NULL,
108 PRIMARY KEY (`Reserva_TipoVisita_Reserva_id`,`Reserva_TipoVisita_tipoVisita`),
109 KEY `Reserva_TipoVisita_Reserva_id_idx` (`Reserva_TipoVisita_Reserva_id`),
110 KEY `Reserva_TipoVisita_tipoVisita_idx` (`Reserva_TipoVisita_tipoVisita`),
111 CONSTRAINT `Reserva_TipoVisita_Reserva_id` FOREIGN KEY (`Reserva_TipoVisita_Reserva_id`) REFERENCES `reserva_tipovisita` (`Reserva_Id`),
112 CONSTRAINT `Reserva_TipoVisita_tipoVisita` FOREIGN KEY (`Reserva_TipoVisita_tipoVisita`) REFERENCES `reserva_tipovisita` (`tipoVisita_id`)
113) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
114/*!40101 SET character_set_client = @saved_cs_client */;
115
116--
117-- Dumping data for table `reserva_grado`
118--
119
120LOCK TABLES `reserva_grado` WRITE;
121/*!40000 ALTER TABLE `reserva_grado` DISABLE KEYS */;
122INSERT INTO `reserva_grado` VALUES (1,1,'segundo'),(2,4,'primero'),(3,2,'primero'),(4,2,'tercero'),(5,2,'segundo'),(6,3,'cuarto'),(7,1,'primero'),(8,5,'primero'),(9,3,'quinto'),(10,2,'sexto');
123/*!40000 ALTER TABLE `reserva_grado` ENABLE KEYS */;
124UNLOCK TABLES;
125
126--
127-- Table structure for table `reserva_tipovisita`
128--
129
130DROP TABLE IF EXISTS `reserva_tipovisita`;
131/*!40101 SET @saved_cs_client = @@character_set_client */;
132/*!50503 SET character_set_client = utf8mb4 */;
133CREATE TABLE `reserva_tipovisita` (
134 `Reserva_Id` int NOT NULL,
135 `tipoVisita_id` int NOT NULL,
136 `cantAlumReservados` int NOT NULL,
137 `cantAlumReales` int NOT NULL,
138 `guia_id` int NOT NULL,
139 PRIMARY KEY (`Reserva_Id`,`tipoVisita_id`),
140 KEY `reserva_id_idx` (`Reserva_Id`),
141 KEY `guia_id_idx` (`guia_id`),
142 KEY `tipovisita_id_idx` (`tipoVisita_id`),
143 CONSTRAINT `guia_id` FOREIGN KEY (`guia_id`) REFERENCES `guia` (`id`),
144 CONSTRAINT `reserva_id` FOREIGN KEY (`Reserva_Id`) REFERENCES `reserva` (`id`),
145 CONSTRAINT `tipovisita_id` FOREIGN KEY (`tipoVisita_id`) REFERENCES `tipovisita` (`id`)
146) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
147/*!40101 SET character_set_client = @saved_cs_client */;
148
149--
150-- Dumping data for table `reserva_tipovisita`
151--
152
153LOCK TABLES `reserva_tipovisita` WRITE;
154/*!40000 ALTER TABLE `reserva_tipovisita` DISABLE KEYS */;
155INSERT INTO `reserva_tipovisita` VALUES (1,1,30,28,1),(2,4,20,18,3),(3,2,28,25,1),(4,2,25,25,3),(5,2,24,24,4),(6,3,45,43,5),(7,1,23,21,2),(8,5,15,15,5),(9,3,35,30,4),(10,2,25,23,2);
156/*!40000 ALTER TABLE `reserva_tipovisita` ENABLE KEYS */;
157UNLOCK TABLES;
158
159--
160-- Table structure for table `telefono`
161--
162
163DROP TABLE IF EXISTS `telefono`;
164/*!40101 SET @saved_cs_client = @@character_set_client */;
165/*!50503 SET character_set_client = utf8mb4 */;
166CREATE TABLE `telefono` (
167 `id` int NOT NULL,
168 `telefono` varchar(12) NOT NULL,
169 `Escuela_idEscuela` int NOT NULL,
170 PRIMARY KEY (`id`),
171 KEY `escuela_idescuela_idx` (`Escuela_idEscuela`),
172 CONSTRAINT `escuela_idescuela` FOREIGN KEY (`Escuela_idEscuela`) REFERENCES `escuela` (`id`)
173) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
174/*!40101 SET character_set_client = @saved_cs_client */;
175
176--
177-- Dumping data for table `telefono`
178--
179
180LOCK TABLES `telefono` WRITE;
181/*!40000 ALTER TABLE `telefono` DISABLE KEYS */;
182INSERT INTO `telefono` VALUES (1,'903547335',3),(2,'964657373',5),(3,'913550811',2),(4,'963071989',2),(5,'919284906',1),(6,'05159631',1),(7,'923578149',4),(8,'922380098',4),(9,'976796522',1),(10,'930769973',3);
183/*!40000 ALTER TABLE `telefono` ENABLE KEYS */;
184UNLOCK TABLES;
185
186--
187-- Table structure for table `tipovisita`
188--
189
190DROP TABLE IF EXISTS `tipovisita`;
191/*!40101 SET @saved_cs_client = @@character_set_client */;
192/*!50503 SET character_set_client = utf8mb4 */;
193CREATE TABLE `tipovisita` (
194 `id` int NOT NULL,
195 `descripcion` varchar(120) NOT NULL,
196 `arancelAlumno` decimal(5,2) NOT NULL,
197 PRIMARY KEY (`id`)
198) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
199/*!40101 SET character_set_client = @saved_cs_client */;
200
201--
202-- Dumping data for table `tipovisita`
203--
204
205LOCK TABLES `tipovisita` WRITE;
206/*!40000 ALTER TABLE `tipovisita` DISABLE KEYS */;
207INSERT INTO `tipovisita` VALUES (1,'Visita',15.00),(2,'Visita Guiada',20.00),(3,'Experiencia Acuatica',25.00),(4,'Experencia Terrestre',18.00),(5,'Paquete promocional',30.00);
208/*!40000 ALTER TABLE `tipovisita` ENABLE KEYS */;
209UNLOCK TABLES;
210/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
211
212/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
213/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
214/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
215/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
216/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
217/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
218/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
219
220-- Dump completed on 2020-12-01 20:14:03
221