 	FOREIGN KEY (numQuarto, idHotel) REFERENCES Quarto (numQuarto, idHotel)
 		MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE
 )
+
+WITH (OIDS = FALSE);
+
+ALTER TABLE Reserva OWNER TO postgres;

	FOREIGN KEY (numQuarto, idHotel) REFERENCES Quarto (numQuarto, idHotel)
		MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE
)

-- Reserva (#&idCliente, #&numQuarto, #&idHotel, #dataReserva, dataCheckIn, dataCheckOut, valorEntrada)
CREATE TABLE Reserva

	FOREIGN KEY (idCliente, numQuarto, idHotel, dataCheckIn) REFERENCES Estadia (idCliente, numQuarto, idHotel, dataCheckIn)
		MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE
)

WITH (OIDS = FALSE);

ALTER TABLE Servico OWNER TO postgres;


-- Estadia (#&idCliente, #&numQuarto, #&idHotel, #dataCheckIn, dataCheckOut)
CREATE TABLE Estadia
