CREATE TABLE Hoteles (
    Id_Hotel VARCHAR(50) PRIMARY KEY,
    Nombre VARCHAR(50),
    Pais VARCHAR(50)
);

CREATE TABLE Habitaciones (
    Id_Habitacion VARCHAR(50) PRIMARY KEY,
    Tipo VARCHAR(50),
    Precio DECIMAL(10,2),
    Id_Hotel VARCHAR(50),
    FOREIGN KEY (Id_Hotel) REFERENCES Hoteles(Id_Hotel)
);

CREATE TABLE Huespedes (
    Id_Huesped VARCHAR(50) PRIMARY KEY,
    Nombre VARCHAR(50),
    Apellidos VARCHAR(50),
    Correo VARCHAR(100),
    Celular INT,
    Id_Habitacion VARCHAR(50),
    FOREIGN KEY (Id_Habitacion) REFERENCES Habitaciones(Id_Habitacion)
);

INSERT INTO Hoteles (Id_Hotel, Nombre, Pais) VALUES
('H001', 'Hotel Arenal Vista', 'Costa Rica'),
('H002', 'Hotel Bahia Azul', 'Mexico'),
('H003', 'Hotel Monteverde', 'Costa Rica');


INSERT INTO Habitaciones (Id_Habitacion, Tipo, Precio, Id_Hotel) VALUES
('HA001', 'Habitacion Sencilla', 45000, 'H001'),
('HA002', 'Suite Familiar', 85000, 'H002'),
('HA003', 'Habitacion Doble', 60000, 'H003');


INSERT INTO Huespedes
(Id_Huesped, Nombre, Apellidos, Correo, Celular, Id_Habitacion)
VALUES
('HU001', 'Lorena', 'Rojas Castro', 'lore.rojas@example.com', 89870028, 'HA002'),
('HU002', 'Emmanuel', 'Hidalgo Jimenez', 'emma.hijim@example.com', 60254120, 'HA003'),
('HU003', 'Catalina', 'Calderon Paniagua', 'cata.cp@example.com', 70981425, 'HA001');

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: