Presentation is loading. Please wait.

Presentation is loading. Please wait.

Group 1 Brooke Sims Don Luna Alison Lee. Problem #7.20 (Part A) Figure 7.19. Using relational algebra we were to specify the query by listing each flight,

Similar presentations


Presentation on theme: "Group 1 Brooke Sims Don Luna Alison Lee. Problem #7.20 (Part A) Figure 7.19. Using relational algebra we were to specify the query by listing each flight,"— Presentation transcript:

1 Group 1 Brooke Sims Don Luna Alison Lee

2 Problem #7.20 (Part A) Figure Using relational algebra we were to specify the query by listing each flight, the flight number, the departure airport for the first leg of the flight, and the arrival airport for the last leg of the flight.

3 One_Leg < Leg_Number = 1 (Flight_Leg) One_Leg2 Flight_Number, Leg_Number, Departure_Airport_Code, Arrival_Airport_Code (One_Leg) Leg_1 FNum1, Leg_Num, Dep_Air_Code1, Arrive_Air_Code1 (One_Leg2) Part A Relational Algebra

4 Leg_Max < Flight_Number AXIMUM Leg_Number (Flight_Leg) Leg_Max2 Flight_Number, Leg_Number, Departure_Airport_Code, Arrival_Airport_Code (Leg_Max) Leg_Result FNum Max, Leg Num Max, Dep Air Code1, Arrive Air Code Max (Leg_Max2) Part A Relational Algebra contd

5 Result Leg_1 |><| FNum1 = FNum Max Leg_Result Part A Relational Algebra contd

6 Problem #7.20 (Part B) Using relational algebra, we were to specify the query by listing the flight numbers and weekdays of all flights or flight legs that depart from Houston Intercontinental Airport (IAH) and arrive in Los Angeles International Airport (LAX).

7 Part B Relational Algebra One_Leg < Leg_Number = 1 (Flight_Leg) One_Leg2 Flight_Number, Leg_Number, Departure_Airport_Code, Arrival_Airport_Code (One_Leg) Leg_1 FNum1, Leg_Num, Dep_Air_Code1, Arrive_Air_Code1 (One_Leg2)

8 Part B Relational Algebra contd Leg_Max < Flight_Number AXIMUM Leg_Number (Flight_Leg) Leg_Max2 Flight_Number, Leg_Number, Departure_Airport_Code, Arrival_Airport_Code (Leg_Max) Leg_Result FNum Max, Leg Num Max, Dep Air Code1, Arrive Air Code Max (Leg_Max2)

9 Part B Relational Algebra contd Result1 Leg_1 |><| FNum1 = FNum Max Leg_Result Temp1 Departure Airport Code = IAH AND Arrival Airport Code = LAX (Flight_Leg) Temp2 FNum Max, Dep Air Code1, Arrive Air Code Max (Result1)

10 Part B Relational Algebra contd Temp3 Dep Air Code1 = IAH AND Arrive Air Code Max = LAX (Temp2) Result2 FNum Max, Dep Air Code1, Arrive Air Code (Temp3) Flight Number, Departure Airport Code, Arrival Airport Code (Temp1) Result3 Result2 |><| FNum Max = Number (Flight)

11 Part B Relational Algebra contd Final Weekdays, Flight Number (Result3)

12 Problem #7.20 (Part C) Using relational algebra, we were to specify the query by listing 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.

13 Part C Relational Algebra Houston City = Houston (Airport) Los_Angeles City = Los Angeles (Airport) Houston_Flights Flight_Leg |><| Departure Airport Code = Airport Code (Houston)

14 Part C Relational Algebra contd LA_Flights Flight_Leg |><| Arrival Airport Code = Airport Code (Los_Angeles) Houston_Flights2 Flight Number, Departure Airport Code, Scheduled Departure Time, Arrival Airport Code, Scheduled Arrival Time (Houston_Flights) Houston_Departs FNum, DAC, SDT, AAC, SAT (Houston_Flights2)

15 Part C Relational Algebra contd LA_Arrives Flight Number, Departure Airport Code, Scheduled Departure Time, Arrival Airport Code, Scheduled Arrival Time (LA_Flights) Result1 Houston_Leave |><| FNum = Flight Number (LA_Arrives) Result2 DAC, SDT, AAC, SAT, Flight Number (Result1)

16 Part C Relational Algebra contd Result3 Result2 |><| Flight_Number = Number (Flight) Final Weekdays, Flight Number, DAC, DAT, Arrival Airport Code, Scheduled Arrival Time (Result3)


Download ppt "Group 1 Brooke Sims Don Luna Alison Lee. Problem #7.20 (Part A) Figure 7.19. Using relational algebra we were to specify the query by listing each flight,"

Similar presentations


Ads by Google