Airline Reservation Schema customer (customer_id, first_name, last_name, customer_email, customer_address, city, customer_phone) airline (airline_code, airline_name, airline_country) city( city_id, city_name, post_code, country, province) flight ( flight_no, airline_code, origin_city, destination_city) flight_schedule (schedule_id, flight_no, departure_date, departure_time, arrival_date, arrival_time) booking ( booking _number, customer_id, schedule_id, booking_class, booking_status) • The customer table contains information about customers and customer_id is the primary key. The field city is a foreign key and refers to the city relation. • The airline table contains information about airlines and airline_code is the primary key. • The city table contains information about cities and city_id is the primary key. Also, the post_code is unique for each city. The flight table contains information about flights and flight_no is the primary key. The fields airline_code, origin_city, and destination_city are foreign keys and refer to airline, city, and city relations respectively. The flight schodulo tablo contains infformation about scheduled trins for tho flight and schodulo id is the priman koy Tho fiold

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

SQL Question

Airline Reservation Schema
customer (customer_id, first_name, last_name, customer_email, customer_address, city, customer_phone)
airline (airline_code, airline_name, airline_country)
city( city_id, city_name, post_code, country, province)
flight ( flight_no, airline_code, origin_city, destination_city)
flight_schedule (schedule_id, flight_no, departure_date, departure_time, arrival_date, arrival_time)
booking ( booking _number, customer_id, schedule_id, booking_class, booking_status)
• The customer table contains information about customers and customer_id is the primary key. The field city is a foreign key and refers
to the city relation.
• The airline table contains information about airlines and airline_code is the primary key.
• The city table contains information about cities and city_id is the primary key. Also, the post_code is unique for each city.
• The flight table contains information about flights and flight_no is the primary key. The fields airline_code, origin_city, and
destination_city are foreign keys and refer to airline, city, and city relations respectively.
• The flight_schedule table contains information about scheduled trips for the flight and schedule_id is the primary key. The field
flight_no is a foreign key and refers to the flight relation.
• The booking table contains information about bookings and booking_number is the primary key. A booking will be for a customer for a
given flight schedule. The fields customer_id and schedule_id are foreign keys and refer to the customer and flight_schedule relations
respectively.
Write an SQL expression to list the flight_no and airline_code of all the flights from city id 22 to city id 33.
Transcribed Image Text:Airline Reservation Schema customer (customer_id, first_name, last_name, customer_email, customer_address, city, customer_phone) airline (airline_code, airline_name, airline_country) city( city_id, city_name, post_code, country, province) flight ( flight_no, airline_code, origin_city, destination_city) flight_schedule (schedule_id, flight_no, departure_date, departure_time, arrival_date, arrival_time) booking ( booking _number, customer_id, schedule_id, booking_class, booking_status) • The customer table contains information about customers and customer_id is the primary key. The field city is a foreign key and refers to the city relation. • The airline table contains information about airlines and airline_code is the primary key. • The city table contains information about cities and city_id is the primary key. Also, the post_code is unique for each city. • The flight table contains information about flights and flight_no is the primary key. The fields airline_code, origin_city, and destination_city are foreign keys and refer to airline, city, and city relations respectively. • The flight_schedule table contains information about scheduled trips for the flight and schedule_id is the primary key. The field flight_no is a foreign key and refers to the flight relation. • The booking table contains information about bookings and booking_number is the primary key. A booking will be for a customer for a given flight schedule. The fields customer_id and schedule_id are foreign keys and refer to the customer and flight_schedule relations respectively. Write an SQL expression to list the flight_no and airline_code of all the flights from city id 22 to city id 33.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY