Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Homework Assignment # 2 : Textbook Exercise 8 . 1 7 ( page 2 8 2 , in 7 th Edition ) Note: You only
Homework Assignment #: Textbook Exercise page in th Edition
Note: You only do Exercise for this homework assignment #
Consider the AIRLINE relational database schema shown in Figure page in th Edition
which describes a database in Exercise page in th Edition Specify the following queries in
relational algebra: a b c d and e
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 co
e Retrieve the number of available seats for flight number co on
Please be aware that you need to cover both flights and flight legs for b and c In other words, "List the
flight numbers and weekdays of all flights or flight legs..." might be better as: "List the flight numbers and
weekdays of all flights AND flight legs..."
The first three queries ab and c require multiple steps. Please explain your steps to get desired
results providing comments, describing what the upcoming statements are doing andor your thought
process behind it Queries d and e are simple queries.
Note: If you have an older edition or an international edition of the textbook, you may see different
problems. Please use the problem above. You do NOT need to do Exercise
Consider the AIRLINE relation database schema shown in Figure which describes a database
for airline flight information. Each FLIGHT is identified by a Flightnumber, and consists of one or more
FLIGHTLEGs with Legnumbers and so on Each FLIGHTLEG has scheduled arrival and
departure times, airports, and one or more LEGINSTANCEsone for each Date on which the flight
travels. FARES are kept for each FLIGHT. For each LEGINSTANCE, SEATRESERVATIONs are kept,
as are the AIRPLANE used on the leg, and the actual arrival and departure times and airports. An
AIRPLANE is identified by an Airplaneid and is of a particular AIRPLANETYPE. CANLAND relates
AIRPLANETYPEs to the AIRPORTs at which they can land. An AIRPORT is identified by an
Airportcode.
Step 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