Add a constraint that enforces the restriction that the number of passengers on a plane cannot exceed the plane's capacity
What will be an ideal response?
CREATE ASSERTION PlaneCapacity
CHECK ( NOT EXISTS (
SELECT *
FROM Planes P, Flights F
WHERE P.Id = F.PlaneId AND P.Capacity <
( SELECT COUNT (*)
FROM Reservations R
WHERE R.FlightId = F.Id) ) )
Computer Science & Information Technology
You might also like to view...
A SharePoint ________ provides information about your organization's products or services to anyone with a Web browser
A) team site B) subsite C) top-level site D) public site
Computer Science & Information Technology
To compare struct variables, you compare them ____.
A. by reference B. by value C. index-wise D. member-wise
Computer Science & Information Technology