Answer to Question #51 in Databases | SQL | Oracle | MS Access for superfreestyler

Question #51
CREATE TABLE Passenger ( id INTEGER PRIMARY KEY, name VARCHAR(20) NOT NULL ); CREATE TABLE Plane ( id INTEGER PRIMARY KEY, capacity INTEGER, type CHAR(1) ); CREATE TABLE Flight ( id INTEGER, planeId INTEGER, flightDate DATE, startLocation VARCHAR(20), destination VARCHAR(20), PRIMARY KEY (Id), FOREIGN KEY (PlaneId) REFERENCES Plane ); CREATE TABLE Reservation ( passengerId INTEGER, flightId INTEGER, PRIMARY KEY (passengerId, flightId), FOREIGN KEY (passengerId) REFERENCES Passenger, FOREIGN KEY (flightId) REFERENCES Flight ); Give an integrity constraint PlaneCapacity that enforces the restriction that the number of passengers on a plane cannot exceed the plane’s capacity
Expert's answer
Dear customer, it's rather complex question in Programming, please, submit your assignment to our site and our experts will help you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog