add BookingGuest table

This commit is contained in:
Timo Ley 2023-04-27 15:27:30 +00:00
parent d9c601678b
commit 17acbca619

View file

@ -59,5 +59,13 @@ CREATE TABLE Booking (
pensionType VARCHAR2(20) NOT NULL.
lateCheckout NUMBER NULL,
clientId NUMBER NOT NULL,
CONSTRAINT clientfk FOREIGN KEY (clientId) REFERENCES Person(personId)
FOREIGN KEY (clientId) REFERENCES Person(personId)
);
CREATE TABLE BookingGuest (
bookingId NUMBER NOT NULL,
personId NUMBER NOT NULL,
PRIMARY KEY(bookingId, personId)
FOREIGN KEY (bookingId) REFERENCES Booking(bookindId),
FOREIGN KEY (personId) REFERENCES Person(personId)
);