add table BookingRoom
This commit is contained in:
parent
17acbca619
commit
72941b5ef9
1 changed files with 11 additions and 2 deletions
|
@ -1,10 +1,11 @@
|
|||
DROP TABLE BookingGuest;
|
||||
DROP TABLE BookingRoom;
|
||||
DROP TABLE Booking;
|
||||
DROP TABLE Adress;
|
||||
DROP TABLE Room;
|
||||
DROP TABLE Person;
|
||||
DROP TABLE Clerk;
|
||||
DROP TABLE Client;
|
||||
DROP TABLE Booking;
|
||||
|
||||
|
||||
CREATE TABLE Adress
|
||||
(
|
||||
|
@ -68,4 +69,12 @@ CREATE TABLE BookingGuest (
|
|||
PRIMARY KEY(bookingId, personId)
|
||||
FOREIGN KEY (bookingId) REFERENCES Booking(bookindId),
|
||||
FOREIGN KEY (personId) REFERENCES Person(personId)
|
||||
);
|
||||
|
||||
CREATE TABLE BookingRoom (
|
||||
bookingId NUMBER NOT NULL,
|
||||
roomNumber NUMBER NOT NULL,
|
||||
PRIMARY KEY(bookingId, personId)
|
||||
FOREIGN KEY (bookingId) REFERENCES Booking(bookindId),
|
||||
FOREIGN KEY (roomNumber) REFERENCES Room(roomNumber)
|
||||
);
|
Loading…
Reference in a new issue