Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The foreign key, depart and arrive for AIRPORT is for the airports name. Example: depart='O'Hare' arrive='Cincinatti' 1. Assume a database with the following schema: AIRPORT(name.city,country,number-runaways)

image text in transcribed

The foreign key, depart and arrive for AIRPORT is for the airports name. Example: depart='O'Hare' arrive='Cincinatti'

1. Assume a database with the following schema: AIRPORT(name.city,country,number-runaways) FLIGHT (flightid, depart,depart-time,arrive,arrive-time, pid, price) PLANE (planeid,type,number-passangers,radius,payload,mar-altitude,mar-speed) where AIRPORT gives information about airports, and name is the primary key; FLIGHT gives information for direct flights from depart to arrive, both of which are foreign keys to AIRPORT (and flightid is the primary key); and PLANE gives information about planes, with planeid the primary key (pid in FLIGHT is a foreign key to PLANE) Write the following questions in SQL: (a) List the flightids of flights from any airport in Chicago that uses Boeing 727s (a type of plane) and cost less than $1,000 (b) List the flightids of international flights (a flight is international if it goes from an airport in some country to another airport in a different country) (c) List the pair of flightids for flights that go from O'Hare airport to Standiford Field airport with one stop (i.e. in two legs) and the total cost (d) List the types of planes that are used in flights starting from O'Hare airport or Midway airport (e) List the types of planes that are used in flights starting from O'Hare airport and flights starting from Midway airport

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago