JFK LHR. airports & flight connections

Similar documents
CSCE 520 Final Exam Thursday December 14, 2017

World Class Airport For A World Class City

World Class Airport For A World Class City

World Class Airport For A World Class City

Unit Activity Answer Sheet

Pacific Airways I S N T T H E W O R L D A S M A L L P L A C E? Operations Manual v 2.3. Revised: Dec. 1, Updated by Tom Detlefsen

British airways business class a380 upper deck. British airways business class a380 upper deck.zip

Airline Network Structures Dr. Peter Belobaba

Section 1.0 Finding a Flight:

Timetables and Availability

Solutions to Examination in Databases (TDA357/DIT620)

Supportable Capacity

Star Alliance Ambassador Club Session Geneva - 31 August Star Alliance News & Updates (Q3/2018)

UBS Transport Conference September 15 th Jean-Cyril Spinetta

Activity Template. Drexel-SDP GK-12 ACTIVITY. Subject Area(s): Sound Associated Unit: Associated Lesson: None

World Class Airport For A World Class City

Award Flight Assist Search Results Prepared for [name removed] on 4 January, 2018

AUCKLAND INTERNATIONAL AIRPORT AKL S14 Start of Season Report (International Traffic)

Description of the National Airspace System

Alliances: Past, Present, And Future JumpStart Roundtable. Montreal June 2, 2009 Frederick Thome Director Alliances

AUCKLAND INTERNATIONAL AIRPORT AKL W13 Season Start IATA Report (International Traffic)

United - PATA Update. Sept 13, 2018

oneworld alliance: The Commission s investigation under Article 101 TFEU

Transportation: Airlines

Paper presented to the 40 th European Congress of the Regional Science Association International, Barcelona, Spain, 30 August 2 September, 2000.

Part 1. Part 2. airports100.csv contains a list of 100 US airports.

Airport Characteristics. Airport Characteristics

U.S. DOMESTIC INDUSTRY OVERVIEW FOR OCTOBER 2010 All RNO Carriers Systemwide year over year comparison

Our view on Baggage Process Control

trends bulletin

LATIN AMERICA / CARIBBEAN CONNECTIVITY

G723. APPLIED TRAVEL AND TOURISM International Travel ADVANCED SUBSIDIARY GCE. Monday 18 January 2010 Afternoon. Duration: 2 hours

AUCKLAND INTERNATIONAL AIRPORT AKL W18 Start of Season Report (International Traffic)

London Winter Storm Late Feb Update Travel Notice Exception Policy

oneworld connect Frequently Asked Questions

Aspen / Pitkin County Airport (ASE) Update on Key Trends & Opportunities

TravelWise Travel wisely. Travel safely.

MIT ICAT. Robust Scheduling. Yana Ageeva John-Paul Clarke Massachusetts Institute of Technology International Center for Air Transportation

Executive Summary with Graphs

AUCKLAND INTERNATIONAL AIRPORT AKL S18 Season Start Report (International Traffic)

2016 Air Service Updates

Trends Shaping Houston Airports

2016 Air Service Updates

Frequent Fliers Rank New York - Los Angeles as the Top Market for Reward Travel in the United States

Ocean Stopover Cities by Itinerary

Global Low Fare Search Comparison Summary Europe, Middle East, and Africa. September 2008

2016 Air Service Updates

2016 Air Service Updates

HUBS, COMPETITION AND GOVERNMENT POLICY

BEFORE THE DEPARTMENT OF TRANSPORTATION OFFICE OF THE SECRETARY WASHINGTON, D.C.

Gulf Carrier Profitability on U.S. Routes

Enhancing customer experience for travel to and from East Timor

trends bulletin 01/2012 Main airlines traffic 3 rd quarter 2011 Main low cost airlines

economy skycouch now available through your GDS Sabre Booking Guide

LCCs: in it for the long-haul?

Aviation Insights No. 8

10 - Relational Data and Joins

Background Information. Instructions. Problem Statement. HOMEWORK INSTRUCTIONS Homework #4 Airfare Prices Problem

Asynchronous Query Execution

Megahubs International Index

THE ECONOMIC IMPACT OF NEW CONNECTIONS TO CHINA

Main airlines traffic 3 rd quarter nd quarter 16/15. 1st quarter 16/15. 3rd. quarter 16/15 01/ nd quarter 16/15. 3rd quarter 16/15.

20-Year Forecast: Strong Long-Term Growth

turnaround tables Arriving and Departing OTP Variances for the World s Largest Airports Based on full year data 2017

Itinerary. Mr Mark Ford 53 Brean Avenue Sheldon Birmingham B26 1JS. British Airways Flight: BA11. Qantas Airways Flight: QF93

Preliminary Altitude and Fuel Analysis for KATL CDA. By Gaurav Nagle Jim Brooks Dr. John-Paul Clarke

ROUTE TRAFFIC FORECASTING DATA, TOOLS AND TECHNIQUES

Airplane Performance. Introduction. Copyright 2017 Boeing. All rights reserved.

BEFORE THE FEDERAL AVIATION ADMINISTRATION WASHINGTON, D.C.

Introduction to Transportation Systems

April 2011 Update- All things Aviation: If you d like additional information please contact the City. Noise 101

Global Airline Capacity Winter 2013/14 Boeing Commercial Airplanes

QUEENSTOWN INTERNATIONAL AIRPORT ZQN W13 Season Start Report

SEPTEMBER 2014 BOARD INFORMATION PACKAGE

Tuesday 12 June 2012 Afternoon

AN ANALYSIS OF AIRLINE/AIRPORT LOUNGE SERVICE USING DATA GATHERED FROM AIRLINEQUALITY.COM

Quality of Service Index

QUEENSTOWN INTERNATIONAL AIRPORT ZQN S15 Start of Season Report

! " in focus. Statistics. Air transport between the EU and the USA. Contents TRANSPORT 7/2006. Highlights. Author Luis DE LA FUENTE LAYOS

Departure Noise Mitigation Review. Dr Darren Rhodes Civil Aviation Authority 18 July

United Kingdom 2016 NOV 3, NOV 20, 2016

Airfare and Hotel Rate Volatility:

Investor Update July 24, 2007

2012 Airfares CA Out-of-State City Pairs -

Next Generation of Airline Alliances

APPENDIX 1: DEFINITIONS - HEATHROW ICT INFRASTRUCTURE

International update Trent Banfield International Operations & Aviation Development Manager

Should you have any queries on the above subject matter please contact our office direct.

FINAL EXAM: DATABASES ("DATABASES") 22/06/2010 SCHEMA

Social Media In Your New & Improved Phoenix Sky Harbor

A note on the network performance of Dubai and Emirates. Dr Guillaume Burghouwt

Group Flights. Conducted by YouGov on behalf of Civil Aviation Authority. Fieldwork Dates: 28th December th January 2018

Airports Council International

Top 50 Passenger traffic between US and the others (country-pair) CANADA MEXICO UNITED KINGDOM JAPAN GERMANY FRANCE DOMINICAN (REP.

An unforgettable experience for middle school students July 2016

For particular shipment information please discuss directly with our customer service representatives.

Westshore Development Forum April 11, Hillsborough County Aviation Authority

Smith, Timothy J. Vice President, Global Procurement Eastman Kodak 343 State Street Rochester, NY 14650

Information meeting. Jean-Cyril Spinetta Chairman and CEO

Vanderbilt Travel January 2019 Airfare Price Testing Testing Session, January 14, 9:30am 10:30am

Transcription:

Case Study AIRLINE DB LAX JFK DEN LHR airports & flight connections AKL September 03 Functional Programming for DB Case Study 1 -- airlines are abstract entities whose names are recorded data Airline = BA UA NZ deriving ( Eq, Show) allairlines :: [Airline] allairlines = [BA, UA, NZ] type AirlineName = String airlinename :: Airline -> AirlineName airlinename BA = British Airways airlinename UA = United Airlines airlinename NZ = Air New Zealand September 03 Functional Programming for DB Case Study 2 1

-- airports are abstract entities, too data Aiport = LHR JFK DEN LAX AKL deriving ( Eq, Show) allairports :: [Airport] allairports = [LHR, JFK, DEN, LAX, AKL] type AirportName = String type Country = String type AirportInfo = ( AirportName, Country ) airportinfo :: Airport -> AirportInfo airportinfo LHR = ( London Heathrow, England ) airportinfo JFK = ( J F Kennedy, United States ) airportinfo DEN = ( Denver, United States ) airportinfo LAX = ( Los Angeles Int, United States ) airportinfo AKL = ( Auckland, New Zealand ) airportname :: Airport -> AirportName airportname x = firstof2 (airportinfo x) airportcountry :: Airport -> Country airportcountry x = secondof2 (airportinfo x) September 03 Functional Programming for DB Case Study 3 -- flights are abstract entities (airline, source, destination) data Flight = BA1 UA1 UA123 UA987 UA234 UA842 NZ2 allflights :: [ Flight ] deriving ( Eq, Show) allflights = [BA1, UA1, UA123, UA987, UA234, UA842, NZ2 ] flightinfo :: Flight -> (Airline, Airport, Airport) flightinfo BA1 = (BA, LHR, JFK) flightinfo UA1 = (UA, LHR, JFK) flightinfo UA123 = (UA, JFK, DEN) flightinfo UA987 = (UA, LHR, LAX) flightinfo UA234 = (UA, DEN, LAX) flightinfo UA842 = (UA, LAX, AKL) flightinfo NZ2 = (NZ, LAX, AKL) flightairline :: Flight -> Airline flightairline f = firstof3 (flightinfo f) flightsource :: Flight -> Airport flightsource f = secondof3 (flightinfo f) flightdest :: Flight -> Airport flightdest f = thirdof3 (flightinfo f) September 03 Functional Programming for DB Case Study 4 2

-- codes of the airports located in the United States [ p p <- allairports, airportcountry p = United States ] -- all airports flown to/from by a given airline serves :: Airline -> [ Airport ] serves x = [flightsource f f <- allflights, flightairline f == x] ++ [flightdest f f <- allflights, flightairline f == x] September 03 Functional Programming for DB Case Study 5 -- names of the airlines serving a given country countryairlines :: Country -> [ AirlineName ] countryairlines y = [airlinename f f <- allairlines, p <- serves f, airportcountry f == y] September 03 Functional Programming for DB Case Study 6 3

-- all airports from where an airline flies to more than one destination hubs :: Airline -> [ Airport ] hubs x = [p p <- allairports, f1 <- allflights, flightairline f1 == x, flightsource f1 == p, f2 <- allflights, flightairline f2 == x, flightsource f2 == p, flightdest f1 /= flightdest f2] September 03 Functional Programming for DB Case Study 7 -- all airports reachable from a given airport on a given airline getthere :: Airline -> Airport -> [Airport] getthere x y = dests ++ [y d <- dests, y <- getthere x d] where dests = [ flightdest f f <- allflights, flightairline f == x, flightsource f == y] LAX JFK DEN LHR Blue -> AKL -> [ LHR JFK LAX ] AKL September 03 Functional Programming for DB Case Study 8 4

Relational AIRLINE DB LINE PORT ID NAME CODE NAME COUNTRY BA British Airways LHR Heathrow England CONNECT No L-ID ORIG DEST 704 BA LHR VIE LINE ( ID char(3) primary key NAME varchar2(25)) PORT ( CODE char (3) primary key NAME varchar2(25) COUNTRY varchar2925)) CONNECT ( No number primary key L-ID char(3) ref LINE(ID) ORIG char(3) ref PORT(CODE) DEST char(3) ref PORT(CODE)) September 03 Functional Programming for DB Case Study 9 -- airport codes located in the United States [ p p <- allairports, airportcountry p = United States ] select ID from PORT where COUNTRY = United States P (s PORT (COUNTRY = United States )) ID September 03 Functional Programming for DB Case Study 10 5

-- airports served by a given airline serves x = [flightsource f f <- allflights, flightairline f == x] ++ [flightdest f f <- allflights, flightairline f == x] select unique LINE.NAME from LINE, PORT, CONNECT where LINE.ID = CONNECT.L-ID and (CODE = ORIG or CODE = DEST) and LINE.NAME = x P (s ((LINE ut PORT) ut CONNECT) (CODE = ORIG or CODE = DEST )) NAME September 03 Functional Programming for DB Case Study 11 -- airlines serving a given country countryairlines y = [airlinename f f <- allairlines, p <- serves f, airportcountry f == y] select unique LINE.NAME from LINE, PORT, CONNECT where LINE.ID = CONNECT.L-ID and (CODE = ORIG or CODE = DEST) and PORT.COUNTRY = y P (s ((LINE ut PORT) ut CONNECT) (CODE = ORIG or CODE = DEST)) COUNTRY September 03 Functional Programming for DB Case Study 12 6

-- airports from where an airline flies to more than one destination hubs :: Airline -> [ Airport ] hubs x =[p p <- allairports, f1 <- allflights, flightairline f1 == x, flightsource f1 == p, f2 <- allflights, flightairline f2 == x, flightsource f2 == p, flightdest f1 /= flightdest f2] select ORIG from CONNECT where L-ID = x group by ORIG having count (*) > 1 A ::= P ( s (CONNECT (L-ID = x))) (ORIG, DEST) returns all connection pairs for x - but R/Algebra does not provide for grouping, nor counting if W :: Relation Æ List (i.e. with repetitions) existed, than would give the answer W A (ORIG) - P A (ORIG) September 03 Functional Programming for DB Case Study 13 -- all airports reachable from a given airport on a given airline getthere x y = dests ++ [y d <- dests, y <- getthere x d] where dests = [ flightdest f f <- allflights, flightairline f == x, flightsource f == y] LAX JFK DEN LHR AKL select DEST from CONNECT where L-ID = x and ORIG = y (Blue, AKL) -> LHR September 03 Functional Programming for DB Case Study 14 7

SQL> select * from GRAPH; ORIG DEST --- --- AKL LHR LHR JFK LHR LAX JFK VIE VIE WAW LAX getthere x y = dests ++ [y d <- dests, y <- getthere x d] where dests = [ flightdest f f <- allflights, flightairline f == x, flightsource f == y] JFK WAV VIE SQL> get q1 1 select level, dest 2 from graph 3 connect by prior dest = orig 4* start with orig = 'AKL' SQL> / LHR AKL LEVEL DEST ------ ---- 1 LHR 2 JFK 3 VIE 4 WAW 2 LAX select LEVEL, ORIG, DEST from CONNECT where L-ID = x connect by prior DEST = ORIG start with ORIG = y SQL> September 03 Functional Programming for DB Case Study 15 8