-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbPruebas.sql
110 lines (95 loc) · 4.27 KB
/
dbPruebas.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
-- MySQL dump 10.13 Distrib 8.0.31, for Linux (x86_64)
--
-- Host: localhost Database: hotelalura
-- ------------------------------------------------------
-- Server version 8.0.31
/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!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' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `funcionarios`
--
DROP TABLE IF EXISTS `funcionarios`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `funcionarios` (
`id` int NOT NULL AUTO_INCREMENT,
`nombre` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `funcionarios`
--
LOCK TABLES `funcionarios` WRITE;
/*!40000 ALTER TABLE `funcionarios` DISABLE KEYS */;
INSERT INTO `funcionarios` VALUES (1,'admin','admin');
/*!40000 ALTER TABLE `funcionarios` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `huespedes`
--
DROP TABLE IF EXISTS `huespedes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `huespedes` (
`id` int NOT NULL AUTO_INCREMENT,
`nombre` varchar(100) DEFAULT NULL,
`apellido` varchar(100) DEFAULT NULL,
`fechanacimiento` date DEFAULT NULL,
`nacionalidad` varchar(100) DEFAULT NULL,
`telefono` varchar(100) DEFAULT NULL,
`idreserva` int DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idreserva` (`idreserva`),
CONSTRAINT `huespedes_ibfk_1` FOREIGN KEY (`idreserva`) REFERENCES `reservas` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `huespedes`
--
LOCK TABLES `huespedes` WRITE;
/*!40000 ALTER TABLE `huespedes` DISABLE KEYS */;
INSERT INTO `huespedes` VALUES (1,'GGG','GGG','2023-01-01','0101','123',1),(2,'JJJ','eee','2023-01-01','01011','123',2),(3,'VVV','eee','2023-01-01','5441','123',3),(4,'EEE','eee','2023-01-01','6577','123',4),(5,'EEE','eee','2023-01-01','6577','123',5),(6,'bbb','BBB','2023-01-01','6577','123',6),(7,'yyy','YYY','2023-01-01','6577','123',6);
/*!40000 ALTER TABLE `huespedes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `reservas`
--
DROP TABLE IF EXISTS `reservas`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `reservas` (
`id` int NOT NULL AUTO_INCREMENT,
`fechaentrada` date DEFAULT NULL,
`fechasalida` date DEFAULT NULL,
`valor` double DEFAULT NULL,
`formapago` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `reservas`
--
LOCK TABLES `reservas` WRITE;
/*!40000 ALTER TABLE `reservas` DISABLE KEYS */;
INSERT INTO `reservas` VALUES (1,'2022-10-02','2022-10-10',100,'Tarjeta Credito'),(2,'2022-10-02','2022-10-10',299,'Efectivo'),(3,'2022-10-02','2022-10-10',100,'Credito'),(4,'2022-10-02','2022-10-10',100,'Efectivo'),(5,'2022-10-02','2022-10-10',100,'Tarjeta Credito'),(6,'2022-10-02','2022-10-10',100,'Credito');
/*!40000 ALTER TABLE `reservas` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-01-03 15:32:24