QUESTION

Text
Image


5.12. Consider the AIRLINE relational database schema shown in Figure 5.8 , which describes a database for airline flight information. Each FLGHT is identified by a Flight_number, and consists of one or more FLIGHT_LEGs with Leg_numbers $1,2,3$, and so on. Each FLIGHT_LEG has scheduled arrival and departure times, airports, and one or more LEG_INSTANCEsone for each Date on which the flight travels. FAREs are kept for each FLIGHT. For each FLIGHT_LEG instance, SEAT_RESERVATIONs are kept, as are the AIRPLANE used on the leg and the actual arrival and departure times and airports. An AIRPLANE is identified by an Airplane_id and is of a particular AIRPLANE_TYPE. CAN_LAND relates AIRPLANE_TYPEs to the AIRPORTs at which they can land. An AIRPORT is identified by an Airport_code. Consider an update for the AIRLINE database to enter a reservation on a particular flight or flight leg on a given date. a. Give the operations for this update. b. What types of constraints would you expect to check? c. Which of these constraints are key, entity integrity, and referential integrity constraints, and which are not? d. Specify all the referential integrity constraints that hold on the schema shown in Figure 5.8 .


AIRPORT \begin{tabular}{|l|l|l|l|} \hline Airport code & Name & City & State \\ \hline \end{tabular} FLIGHT \begin{tabular}{|l|l|l|} \hline Flight_number & Airline & Weekdays \\ \hline \end{tabular} FLIGHT_LEG \begin{tabular}{|l|l|l|r|} \hline Flight_number & Leg_number & Departure_airport_code & Scheduled_departure_time \\ \hline & Arrival_airport_code & Scheduled_arrival_time \\ \hline \end{tabular} LEG_INSTANCE \begin{tabular}{|c|c|c|c|c|c|} \hline Flight_number & Leg_number & Date & Number_of_available_seats & \multicolumn{2}{|c|}{ Airplane_id } \\ \hline Departure_airport_code & Departure_time & Arrival_airport_code & Arriva__time \\ \hline \end{tabular} FARE \begin{tabular}{|l|l|l|l|} \hline Flight_number & Fare_code & Amount & Restrictions \\ \hline \end{tabular} AIRPLANE_TYPE \begin{tabular}{|l|l|l|} \hline Airplane_type_name & Max_seats & Company \\ \hline \end{tabular} CAN_LAND \begin{tabular}{|l|l|} \hline Airplane_type_name & Airport_code \\ \hline \end{tabular} AIRPLANE Figure 5.8 The AIRLINE relational database schema.

Public Answer

6ADT2Z The First Answerer