Consider the following small database whose records correspond to flights depart
ID: 666106 • Letter: C
Question
Consider the following small database whose records correspond to flights departing from an airport. Airline Flight number Gate Destination Departure time FlyRight 122 34 Detroit 08.10 221 22 Denver 08:17 Anchorage Fly Right 199 13 Detroit 08:47 222 22 Denver 09:10 a. Are the attributes Airline and Destination a key for this database? b. Give examples of two separate sets of attributes that are keys for this database c. Show the results of the operation SELECTIAirline "JetGreen" A Destination "Denver'i d. Show the results of the operation PROJECTIAirline, Gate l e. Show the results of the operation SELECTIDestinat "Denver' l followed by Project(Gate] tion f. What operation or operations should be performed if you wanted to know which airlines use gate 22? g. What operation or operations should be performed if you wanted to know whether there are any flights to Detroit departing before 9:10? A flight is identified by the airline and the flight number. Problem 6 The table below shows the database of course offerings for the Computer Science Department for the current academic year. It's actually just a portion of the course offerings, but for the purposes of this question, assume it lists all the courses Course number Course title Instructor Quarter CS111 Digital Image Processing Majumder Spring CS 112 Computer Graphics Majumder Spring cs 117 Project in Computer Vision Fowlkes Fall 16 Computational Photography & Vision Fowikes Winter CS 122A Introduction to Data Management Carey Spring Cs 12A Introduction to Data Management Li Winter Carey Winter CS 122C Principles of Data Management a. Give a key for this database. b. Show the results of the operation SELECTICourse number "CS122A v Course number CS122C" c. Show the results of the operation PROJECTI Instructor 1 d. Show the results of the operation SELECTIQuarter "Spring followed by Project Course number]. Express in English what question this combination of queries is asking. e. What operation or operations should be performed if you wanted to know which quarters CS 122A is being offered? f. What operation or operations should be performed if you wanted to know which courses are being taught by Prof. Majumder?Explanation / Answer
Question 3
1. No Airline and Destination are not keys for this database as using key we can determine the unique row in the database.
for example there may be many airline of same name to same destination.
2. Key for this database is (Flight number and Gate) as using them we can get unique row from the set.
3. (JetGreen 221 33 Denver 08:17) is the result of SELECT[Airline="JetGreen" ^ Destination="Denver"]
4. return all the Airline and Gate from the Database
e.
f. select Airline from database_name where gate = 22;
g. select * from database_name where Destination = 'Detroit' and Departure time < 09:10;
Question 4.
a) Course and Quarter are the key for the database.
b)
*Introduction to DM = Introduction to Database Management
*Principle of DM = Principle of Database Management
c.
d. This is asking the course number being floated in Spring.
e. select Quarter from database_name where Course number = "CS 122A";
f. select Course number, Course Title where instructor="Majumder";