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...
-
The position as a function of time of a squirrel running on a grass field is given in polar coordinates by: r(t) = 25 + 30[1- esin(0.07t)] m θ(t) = 2Ï(l - e-0.2t) (a) Plot dle...
-
The table below shows the closing monthly stock prices for Amazon.com and Google during 2011. Calculate the simple three-month moving average for each month for both companies. AMZN GOOG...
-
A fuel cell is an electrochemical energy conversion device in which (a) The chemical energy of a fuel is converted directly into electrical energy (b) The electrical energy of a fuel is converted...
-
Don Levine Corporation is considering adding an additional plant to its three existing facilities in Decatur, Minneapolis, and Carbondale. Both St. Louis and East St. Louis are being considered....
-
Discuss the benefits of considering customers' needs for the business and explain your perspectives of value added to the customer. Please bring an example of a business you are familiar with and...
-
What is a specific police department impacted by a recent legislative actions, court decisions, regulatory and statutory changes, and laws and ordinances? Analyze how the legislative actions, court...
-
Refer to the following diagram to answer this question. B C AA -OF 8 1. If ball 1 is hit at the same time by balls 2 and 3, which are traveling at the same speed, in which direction will ball 1...
-
HavenCo is a US corporation with extensive foreign operations. It had $270 million of average gross receipts over the prior three years. In the current year, Haven has US taxable income of...
-
On July 1, 2023, LIN Inc. issued a five-year, 10% bond of $400,000 for the discount price of $343,811. Interest is to be paid semi-annually on June 30 and December 31. The company's year end is July...
-
In 2022 Green, Inc., had gross receipts from sales of $500,000, dividends of $100,000 from a domestic corporation in which Green, Inc., owned 50% of the stock, and operating expenses of $800,000....
-
Cream Co has two foreign branches who income is earned through active business operations, IE the income is not passive. High Tax Branch earned 6 million of taxable income and paid 1.8 million in...
-
Capital controls can affect the correlation between the movement of stock markets in different countries. What is an example of a capital control?
-
a) Suppose a firm has the Cobb-Douglas the production function f(x1, x2) = x0.5x2.5 where x is the amount of factor 1 that the firm uses in the production process and X2 is the corresponding amount...
-
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...
-
What do you really enjoy doing? What is your passion? Can your passion be a platform for a viable opportunity?
-
What do your friends and family envision you doing? What strengths and weaknesses do they observe? How do their insights help lead you to an opportunity that is right for you?
-
Put several of your ideas through the opportunity checklist in Figure 3.10. Which ideas seem to have the highest potential? Customer Identifiable Demographics Psychographics Trends Macromarket Target...
Study smarter with the SolutionInn App