Consider the AIRLINE relational database schema shown below. Specify the following queries in relational algebra: a....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the AIRLINE relational database schema shown below. 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 all fare information for flight number 'co197'. d. Retrieve the umber of available seats for flight number 'co197' on '2009-10-09'. e. Make up 3 additional queries in English and provide the respective relational algebra commands. Be creative! AIRPORT Airport_code Name City State FLIGHT Flight_number Airline Weekdays FLIGHT_LEG Flight_number Leg number Departure_airport_code Scheduled_departure_time Arrival_airport_code Scheduled_arrival time LEG INSTANCE Flight number Leg_number Date Number_of_available_seats Airplane_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 Company CAN LAND Airplane_type_name Airport code AIRPLANE Airplane_id Total_number_of_seats Airplane_type SEAT RESERVATION Flight number Leg_number Date Seat number Customer_name Customer phone Consider the AIRLINE relational database schema shown below. 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 all fare information for flight number 'co197'. d. Retrieve the umber of available seats for flight number 'co197' on '2009-10-09'. e. Make up 3 additional queries in English and provide the respective relational algebra commands. Be creative! AIRPORT Airport_code Name City State FLIGHT Flight_number Airline Weekdays FLIGHT_LEG Flight_number Leg number Departure_airport_code Scheduled_departure_time Arrival_airport_code Scheduled_arrival time LEG INSTANCE Flight number Leg_number Date Number_of_available_seats Airplane_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 Company CAN LAND Airplane_type_name Airport code AIRPLANE Airplane_id Total_number_of_seats Airplane_type SEAT RESERVATION Flight number Leg_number Date Seat number Customer_name Customer phone
Expert Answer:
Answer rating: 100% (QA)
Airport CREATE TABLE airportairportcode number6 PRIMARY KEY name varchar220city varchar15 state varc... View the full answer
Related Book For
Fundamentals of Database Systems
ISBN: 978-0136086208
6th edition
Authors: Ramez Elmasri, Shamkant Navathe
Posted Date:
Students also viewed these databases questions
-
Consider the AIRLINE relational database schema shown in Figure 3.8, which describes a database for airline flight information. Each FLIGHT is identified by a flight NUMBER, and consists of one or...
-
Consider the relational schema shown in Figure 26.18. Write active rules for keeping the SUM_COMMISSIONS attribute of SALES_PERSON equal to the sum of the COMMISSION attribute in SALES for each sales...
-
Consider the relational schema shown in Figure below. a. Give a schema definition in SQL: 1999 corresponding to the relational schema, but using references to express foreign-key relationships. b....
-
Determine which of the following statement(s) will always be true. It is possible that more than one statement is true. Only write down the letters of the statements that are true. n +1 2.1 The...
-
In its annual report, American Eagle Outfitters states that its e-commerce operation records revenue upon the estimated customer receipt date of the merchandise. Is this FOB shipping point or FOB...
-
Figure P32.41 shows resistors \(R_{1}=10.0 \Omega\) and \(R_{2}=20.0 \Omega\) connected in parallel to an AC source. (a) If the maximum current in the circuit is \(12 \mathrm{~A}\), what is the...
-
Recall, there is some disincentive for parties to elect a trial de novo after receiving an adverse arbitration award. Further investigate CCP 1141.21 and determine the costs and fees that the party...
-
Use the information from the Crystal Cruiseline Data Set to compute the number of dinner cruise tickets it must sell to breakeven and the sales dollars needed to breakeven. Crystal Cruiseline Data...
-
Calculate the Holding Period Return for an investment purchased at $155.20 and sold at $184.39. Assume no additional dividends during the holding period.
-
Which statement is true when customers pay bills with a credit card? Question 1 options: a) You can use QuickBooks' Merchant Account Service to get online authorization and then download payments...
-
1) Construct the frequency distribution and the histogram. Use six intervals with widths of 700 < x 800; 800 < x 900; etc. How many schools achieved an average total score higher than 1000?...
-
A kanban system has just been introduced into a machine shop to control the pro- duction of a common part used by many different subassemblies at many different workstations. The kanban system has...
-
On a very still morning, the surface temperature of a lake used to cool the condenser of a power plant is \(30^{\circ} \mathrm{C}\) while the air temperature is \(23^{\circ} \mathrm{C}\) with a...
-
Laminar flow normally persists on a smooth flat plate until a critical Reynolds number value is reached. However, the flow can be tripped to a turbulent state by adding roughness to the leading edge...
-
As a means of preventing ice formation on the wings of a small, private aircraft, it is proposed that electric resistance heating elements be installed within the wings. To determine representative...
-
Atmospheric air is in parallel flow \(\left(u_{\infty}=10 \mathrm{~m} / \mathrm{s}, T_{\infty}= ight.\) \(15^{\circ} \mathrm{C}\) ) over a flat heater surface that is to be maintained at a...
-
What are the structural and functional complexities of prokaryotic cell membranes, and how do they contribute to processes such as nutrient uptake, osmoregulation, and signal transduction?
-
Find the radius of convergence in two ways: (a) Directly by the CauchyHadamard formula in Sec. 15.2. (b) From a series of simpler terms by using Theorem 3 or Theorem 4.
-
Recent changes in privacy laws have disallowed organizations from using SSN to identify individuals unless certain restrictions are satisfied. As a result, most US universities cannot use SSNs as...
-
Consider the relational database schema of Figure 3.5. Suppose that all the relations were created by (and hence are owned by) user X, who wants to grant the following privileges to user accounts A,...
-
Consider the EMPLOYEE table's constraint EMPSUPERFK as specified in Figure 4.2 is changed to read as follows: CONSTRAINT EMPSUPERFK FOREIGN KEY (SUPERSSN) REFERNCES EMPLOYEE(SSN) ON DELETE CASCADE ON...
-
The upper curve in the boiling point diagram is called (a) The saturated vapour curve (b) The dew point curve (c) The saturated liquid curve (d) Both (a) and (b).
-
A vertical cylinder containing helium gas is filled with a piston of \(50 \mathrm{~kg}\) mass and crosssectional area of \(0.025 \mathrm{~m}^{2}\). If the atmospheric pressure outside the cylinder is...
-
The Joule-Thomson coefficient for any gas at inversion point is (a) 1 (b) 0 (c) 2 (d) 3
Study smarter with the SolutionInn App