Tutorial 4 - • For each LEG instance, the airplane used...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Relational Algebra 1.Consider the following AIRLINE database schema that describes the database for airline flight information: AIRPORT (Airport-code , Name, City) 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) Assume the following set of requirements: An AIRPORT is identified by an Airport-code. Each FLIGHT is identified by a Flight-number and consists of one or more FLIGHT_LEGs with leg-number being 1, 2, 3, etc. Weekdays (e.g. Monday, Tuesdays, etc.) are also recorded with each FLIGHT. Each leg has scheduled arrival and departure times and airports. It has also many LEG_INSTANCEs - one for each Date on which the flight travels.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: • For each LEG instance, the airplane used in the leg, the number of available seats and the actual arrival and departure times and airports and kept. Write the following queries in relational algebra: (i) Retrieve the number of available seats and the leg number for flight number 'NY197' on '01-Mar-93'. (ii) 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. (iii) List the flight numbers and weekdays of all flights or flight legs that depart from New York International Airport (airport code 'IANY') and arrive in London International Airport (airport code 'IALD'). (iv) List the flight number and weekdays of all flights or flight legs that depart from some...
View Full Document

This note was uploaded on 02/06/2012 for the course FACULTY OF WXGE6320 taught by Professor Noraini during the Winter '09 term at University of Malaya.

Ask a homework question - tutors are online