Menu

(Solved) : Please Answer 8 9 10 Show Step Stumped Queries Hoping Clear Solution Q43990418 . . .

Consider the following database schema for relations representing airline-flight data: • Flights (fno: integer, cityfrom: str

8. Find the sids of staff who are certified for the largest number of aircraft (either pilots or mechanics). 9. Find the sids

Please answer 8,9,10 and show each step. Very stumped on thesequeries, hoping for a clear solution.

Consider the following database schema for relations representing airline-flight data: • Flights (fno: integer, cityfrom: string, cityto: string, distance: integer, departs: datetime, arrives: datetime) Airplane (aid: integer, manufacturer: string, code: integer, range: integer) Certification(sid: integer, aid: integer, type: string, ispilot: boolean) Staff(sid: integer, sname: string, salary: integer) The Staff relation describes pilots, mechanics, and other kinds of staff as well; every pilot is certified to fly some aircraft, and every mechanic is certified to maintain some aircraft. (These certifications also imply that individual pilots and mechanics are qualified for their positions). Only pilots and mechanics have certifications. Write the following ten queries using the relational algebra (RA) with operations as described in lectures. Note that some of these queries cannot expressed in the RA, and if this is the case for a query, informally explain why this is so (i.e., a formal proof of inexpressibility is not necessary). 8. Find the sids of staff who are certified for the largest number of aircraft (either pilots or mechanics). 9. Find the sids of staff who are certified to fly exactly three aircraft. 10. Find the total amount paid to staff as salaries. Show transcribed image text Consider the following database schema for relations representing airline-flight data: • Flights (fno: integer, cityfrom: string, cityto: string, distance: integer, departs: datetime, arrives: datetime) Airplane (aid: integer, manufacturer: string, code: integer, range: integer) Certification(sid: integer, aid: integer, type: string, ispilot: boolean) Staff(sid: integer, sname: string, salary: integer) The Staff relation describes pilots, mechanics, and other kinds of staff as well; every pilot is certified to fly some aircraft, and every mechanic is certified to maintain some aircraft. (These certifications also imply that individual pilots and mechanics are qualified for their positions). Only pilots and mechanics have certifications. Write the following ten queries using the relational algebra (RA) with operations as described in lectures. Note that some of these queries cannot expressed in the RA, and if this is the case for a query, informally explain why this is so (i.e., a formal proof of inexpressibility is not necessary).
8. Find the sids of staff who are certified for the largest number of aircraft (either pilots or mechanics). 9. Find the sids of staff who are certified to fly exactly three aircraft. 10. Find the total amount paid to staff as salaries.

Expert Answer


Answer to Please answer 8,9,10 and show each step. Very stumped on these queries, hoping for a clear solution….

OR