Question: Consider the given Relational database schema for an Airlines application. The primary key of each relation is underlined. Flight (FlightNo) FlyON (FlightNQ, WeekDay) FlightLeg (FightNo,

Consider the given Relational database schema for an Airlines application. The primary key of each relation is underlined. Flight (FlightNo) FlyON (FlightNQ, WeekDay) FlightLeg (FightNo, LegNo, DepartureTime, DepartureAirportCode, ArrivalTime, ArrivalAirportCode) FlightLeglnstance (FightNo, LegNo, Date, ActualDepartureTime, ActualDepartureAirportCode, ActualArrivaltime, ActualArrivalAirportCode, AirplaneType, AirplaneNo) Airport (AirportCode, AirportCity) AirplaneType (AirplaneType, ManufacturingCompany, Seatcapacity) Airplane (AirplaneType, AirplaneNo, ManufacturingYear, Status) CanLand (AirplaneType, AirportCode) FlightLegFares (FlightNo, LegNo, Class, Farevalue) Using DDL/DML of SQL2, write the appropriate statements to perform the following operations: a. Define a view to get the total number of flying trips (flight leg instances) for each airplane during the last year (2006). Write a query to display such airplanes with more than 200 trips. Consider again the same Relational database schema for the Airlines application with all the tables and views are already created. Suppose that Moustafa is the DBA of this database and he wants to grant the following privileges to users' accounts Eman, Wael, Sherif, and Menna. Write SQL statements to grant these privileges: Account Eman can retrieve and modify all information of Flight, FlyOn, and FlightLeg. Account Wael can retrieve only the FlightLegInstances' data of only those departing from Cairo airport. Account Sherif can only modify the Farevalue of FlightLegFare. Account Menna, can only get the total number of flying trips (flight leg instances) for each airplane during the last year (2006)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
