CS 5530 / 6530 Database Systems: Autumn 1998 Gary Lindstrom Wei Tao
CS 5530 / 6530 Database Systems: Autumn 1998 Gary Lindstrom Wei Tao
These problems deal with the airline database entity-relationship diagram shown in Figure 1 of Assignment 1. As before, this model represents only non-stop ights. It is extended to include associating aircraft with departures via the Equipment relationship set. Program each of the following queries in Sybase SQL. Hand in your results using the handin utility. Directions on this utility will be provided later.
1 (5 points)
Find the numbers and dates of all departures with employee 1001 assigned.
3 (10 points)
List all attributes of ights arriving at DEN, with the ights listed in arrival time order.
4 (10 points)
List the name of each airport, together with the number of ights originating at that airport. Order the list by decreasing number of ights. If an airport has no originating ights, it can either be omitted from the list, or listed with a zero number. 1
(10 points)
List the number and date of all departures that do not have any aircraft (equipment).
6 (10 points)
Find the names of all pilots who are assigned to a departure using a plane the pilot is not known to be able to y.
7 (10 points)
List the numbers and dates of all departures, along with the count of all non-pilot employees who are riding as passengers (booked on the departure and not assigned to it). If the count is zero, it is optional whether that departure is in the answer list.
8 (10 points)
List the maker and model number of all planes that can be own by a pilot in the database, along with the salary range (maximum and minimum salaries) of the pilots who can y that plane.
9 (15 points)
List all departure dates and numbers, along with the total crew (assigned employee) salary cost divided by the number of booked passengers, in decreasing cost order. If there are no passengers booked on a departure, or no employees assigned ignore that departure.
10 (15 points)
List all pairs of airports (originating and destination) for which it is possible to make a round trip on a single day. (There must exist two departures on the same day, from the originating airport to the destination airport and vice-versa, with the return ight having a later departure time than the out-bound ight).
Extra Question For CS 6530 Students] 11 (30 points)
1. Implement the Department Store database in Figure 2 of Assignment 1 in Oracle 8. 2. De ne a view on this database that provides appropriate and useful summary of the database contents for each of the following users: 2
The store's chief executive; The store's personnel manager; The store's customer service representatives. 3. Populate your database with contents that demonstrate your views in interesting ways.