ch6_hw_solution1 - 6.17 Consider the AIRLINE relational...

This preview shows page 1 - 2 out of 4 pages.

6.17. 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. دحأ لولحلا DEPARTURE = Flight_number ξ MIN Leg_number (FLIGHT_LEG) Departure_airport = π Flight_number,Departure_airport_code (DEPARTURE * FLIGHT_LEG ) ARRIVAL = Flight_number ξ MAX Leg_number (FLIGHT_LEG) Arrival _airport = π Flight_number, Arrival_airport_code (ARRIVAL * FLIGHT_LEG ) RESUL<- Departure_airport * Arrival _airport لح رخأ DEPARTURE = Flight_number ξ MIN Leg_number (FLIGHT_LEG) ARRIVAL = Flight_number ξ MAX Leg_number (FLIGHT_LEG) RESUL<- π Flight_number,Departure_airport_code,Arrival_airport_code ((DEPARTURE×ARRIVAL)*AIRPORT ) b. List the flight numbers and weekdays of all flights or flight legs that depart from Houston Intercontinental Airport

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture