Problem:
You are given the following schema
1. Flights(flno, from, to, distance)
2. Aircraft(aid, flno, aname, cruisingRange)
3. Certified(eid, aid)
4. Employees(eid, ename, salary)
‘CruisingRange' is the distance that can be covered by an aircraft in a non-stop mode.
(i) Write the following queries in Relational Algebra.
(a) Find the names of pilots certified for 'Boeing 747' aircraft.
(b) Find the ids of all aircraft that can be used on non-stop flights from New York to Los Angeles.
(c) Find the names of pilots who can operate planes with a range greater than 3000 miles, but are not certified on 'Boeing 747' aircraft.
(ii) Write the following queries in SQL.
(a) Find the ids of employees who are not certified at all.
(b) Find the ids of all aircraft that can be used on non-stop flights from New York to Los Angeles.