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...
-
Why would a company choose to source raw materials, components, or other products or services from a foreign supplier?
-
a) An individual in the 28 percent federal income tax bracket and 15 percent long-term capital gains tax bracket bought and sold the following securities during the year: What are the taxes owed on...
-
Reconsider the data from Problem 56. What is the capital recovery cost of Model 334A? Data from problem 56 Octavia Bakery is planning to purchase one of two ovens. The expected cash flows for each...
-
Mickley Corporation produces two products, Alpha6s and Zeta7s, which pass through two operations, Sintering and Finishing. Each of the products uses two raw materials, X442 and Y661. The company uses...
-
Yvonne can use two coupons for the same purchase at her favorite department store. One coupon gives her $20 off and the other gives her 25% off. She wants to buy a bedspread that sells for...
-
Given the regression equation Y = 100 + 10X a. What is the change in Y when X changes by +3? b. What is the change in Y when X changes by -4? c. What is the predicted value of Y when X = 12? d. What...
-
Suppose the market demand for ECO101 textbooks at the UofT is given by Q=1000-2P. The Marginal Cost of a textbook is $50. Suppose there are only two textbook publishers, both printing the exact same...
-
ontinuous improvement violates which regression analysis assumption? Multiple choice question. The errors in estimating the costs are dependent on the cost drivers. The process for which costs are...
-
employees hired before 1996 who are paid retiring allowance have the option of transferring an eligible portion of the allowance to a RRSP or RPP with no income tax withholding at the source
-
Using the weighted procedure methodof setting rates, calculate the relativevalueand cost per procedure for the following lab procedures, givenatotal labcostof $1.25 million andanaverage hourly lab...
-
Hackett Homes constructed a new subdivision during 2023 and 2024 for $2,900,000. Relevant data are summarized below: 2023 2024 Actual costs incurred $930,000 $810,000 Gross profit $0 $1,160,000...
-
a. As the financial consultant of Explicit Investment Company, you have been asked to advice a group of companies in the various stages of the life cycle (startups, growing, matured firms) seeking...
-
Care needs to be taken to ensure that amounts shown in Box 7 of Form 1099MISC, are handled properly. This form is given to the taxpayer when the payer does not consider the recipient an employee and...
-
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...
-
Why is gifting an important estate planning tool? Why are assets that grow in value recommended as gifts?
-
Following his death in 2012, Zane Wulster's gross taxable estate was valued at $3,300,000. He has made a total of $200,000 of gifts that exceeded the annual gift tax exclusion. a. What is the amount...
-
Explain how the portable estate exemption, resulting from the 2010 Tax Relief Act, altered estate planning using family trusts.
Study smarter with the SolutionInn App