Question
Consider the AIRLINE relational database schema shown in Figure 5.8, which was described in Exercise 5.12. Specify the following queries in relational algebra : (a).
Consider the AIRLINE relational database schema shown in Figure 5.8, which was described in Exercise 5.12. Specify the following queries in relational algebra:
(a). For each flight, list the flight number, the departure airport for the first leg of the flight, and the arrival airport for the last leg of the flight.
(b). List the flight numbers and weekdays of all flights or flight legs that depart from Houston Intercontinental Airport (airport code iah) and arrive in Los Angeles International Airport (airport code lax).
(c). List the flight number, departure airport code, scheduled departure time, arrival airport code, scheduled arrival time, and weekdays of all flights or flight legs that depart from some airport in the city of Houston and arrive at some airport in the city of Los Angeles. (d). List all fare information for flight number co197. (e). Retrieve the number of available seats for flight number co197 on 2009- 10-09.
AIRPORT Airport code Name City State FLIGHT Flight number Airline Weekdays FLIGHT LEG Flight number Leg I Departure airport code Scheduled departure time number Arrival airport code Scheduled arrival time LEG INSTANCE Fight number Log numbor Date Number of available seats Arplane id Departure airport code Departure time Arrival airport code Arrival time FARE Flight number Fare code Amount Restrictions AIRPLANE TYPE Airplane type name Max seats compan CAN LAND Airplane type name Airport code AIRPLANE Airplane d Total number of seats Airplane lype SEAT RESERVATION Flight number Leg number Date Seat number Customer name Customer phoneStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started