Add cascade deletes for Reservation foreign keys (part h)
parent
d03d0f5069
commit
0a79f86be8
|
@ -49,8 +49,8 @@ CREATE TABLE Reservation(
|
|||
travelAgentID NUMBER,
|
||||
travelDate DATE,
|
||||
CONSTRAINT Reservation_pk PRIMARY KEY(reservationID),
|
||||
CONSTRAINT Reservation_customerID_fk FOREIGN KEY (customerID) REFERENCES Customer(customerID),
|
||||
CONSTRAINT Reservation_cruiseID_fk FOREIGN KEY (cruiseID) REFERENCES Cruise(cruiseID),
|
||||
CONSTRAINT Reservation_travelAgentID_fk FOREIGN KEY (travelAgentID) REFERENCES TravelAgent(travelAgentID)
|
||||
CONSTRAINT Reservation_customerID_fk FOREIGN KEY (customerID) REFERENCES Customer(customerID) ON DELETE CASCADE,
|
||||
CONSTRAINT Reservation_cruiseID_fk FOREIGN KEY (cruiseID) REFERENCES Cruise(cruiseID) ON DELETE CASCADE,
|
||||
CONSTRAINT Reservation_travelAgentID_fk FOREIGN KEY (travelAgentID) REFERENCES TravelAgent(travelAgentID) ON DELETE CASCADE
|
||||
);
|
||||
CREATE SEQUENCE reservationID_seq;
|
Loading…
Reference in New Issue