CREATE TABLE Flight
(
FlightID INTEGER NOT NULL,
FlightDate TIMESTAMP NOT NULL,
Origin VARCHAR(30) NOT NULL,
Destination VARCHAR(30) NOT NULL,
MaxCapacity INTEGER NOT NULL,
PricePerSeat DECIMAL NOT NULL
)
CREATE TABLE FlightBooking
(
BookingID INTEGER NOT NULL,
CustomerID INTEGER NOT NULL,
FlightID INTEGER NOT NULL,
NumSeats INTEGER NOT NULL,
Status CHAR(1) NOT NULL,
BookingTime TIMESTAMP NOT NULL,
TotalCost DECIMAL
)
status = Reserve, Held Cancelled or Expired (only reserved and held are taken into account)
CREATE TABLE SeatBooking
(
BookingID INTEGER NOT NULL,
PassengerID INTEGER NOT NULL,
SeatNumber CHAR(4)
)
如果给出了flightid以及可用座位总数、保留座位总数和保留座位总数,我是否可以获取座位状态?