Instance of the Airnort Database Airport Carrier Flight (airport/D, name, city,s
ID: 3593493 • Letter: I
Question
Instance of the Airnort Database Airport Carrier Flight (airport/D, name, city,state, country) (carrierID, name, fleetSize, employees, revenue) (carrierlD, flightNo, date, time, airportID, destination, distance) Airport airport! name CDG Charles de Gaulle Paris FRA DXB Dubai International JFK John F Kennedy International New York LGA LaGuardia MIA Miami Internationa SFO San Francisco International San Francisco CA USA USA New York USA -Each airport name is unique in its country. - The state attribute only applies to the United States airports. Carrier carrieriD fleetsize AF Air France DL Delta Air Lines EK Emirates Airline239 84,602 15,414 80,000 39,639 84,153 18,300 31,467 13,050 855 US US Airways 338 Each carrier name is unique in the whole world. - Flight carrieriD flightNo date time airportio destination distance DL 426|10/17/2017| 7:00 AMI JFKI sro | 2.586 426 10/16/2017 7:00 AM JF DL SFO SFO 479 10/16/2017 7:25 PM JFK SFO 2586 DL EK US DL AF 3,259 783 10/17/2017 3:20 AM DXB JFK 6,83 1,099 3,629 2,576 4,580 721 10/17/2017 11:25 AM CDG DXB 1472 10/17/2017 7:30AM LGA 3577 10/17/2017 5:45 PM JFK MIA CDG | SFO I-MA US3577 10/17/2017 9:40 AM LGA AF AF | 3634|10/16/201 1:20 PMI-CDG Any (carrierID, flightNo) combination is unique for the whole dayExplanation / Answer
MODULE 1:
1. true
2. false
3. true
4. true
5.false
6. true
7.false
8. false
9. 9
10. 7
11. carried id , flight no
12. carried id
13. carried id
14.foreign key
15 no primary key -primery key cont be duplicate
MODULE 2:
1. select name from airport;
2. select * from airport where state='NY';
3. select name ,state from airport;
4. select name, fleetsize from carrier where employes>54000;
5. select c.name,c.id,f.flightno,f.date from carrier c,flight f;
6. select count(airportid) from airport;
7. select count(flightno) from flight where distence>3000;
8. select avg(revenue) from carrier;
9. select sum(distence) from flight where airportid='JFK';
10. select min(distence),avg(distence),max(distence) from flight where date='10/17/2017';
11. select count(airportid) from airport where country in('FRA','UAE');
12. select flightno,avg(dist) from flight where carriedid in ('DL','EK','US','AF');
MODULE 3:
1. list of all airport names?
ans: select name from airport where airportid in('JFK','LGA');
2.select * from airport where state='NY';
3 . select name, state from airport where country='USA';
4. select name,fleetsize from carriers where employees>50000;
5. select airportid from airport where state in('NY','FL','CA');
6. select carried,distence from carrier where state!='JFK';
7. select a.name ,c.name from carriers c,airport a where a.country='FRA';