Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribedimage text in transcribed

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). 1. Find the sids of pilots certified for some Bombardier aircraft (i.e., an airplane manufactured by Bombardier). 2. Find the names of mechanics certified to maintain some Embraer aircraft. 3. Find the aids of all airplanes that can be used on non-stop flights from Toronto (Canada) to Seoul (South Korea). 4. Identify the flights that can be piloted by every pilot whose salary is more than $150,000. 5. Find the names of mechanics who can maintain airplanes with a range less than 3000 miles but are not certified to work on any Airbus airplane. Find the sids of staff who make the highest salary. 6. 7. Find the sids of staff who make the second-highest salary. 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. 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). 1. Find the sids of pilots certified for some Bombardier aircraft (i.e., an airplane manufactured by Bombardier). 2. Find the names of mechanics certified to maintain some Embraer aircraft. 3. Find the aids of all airplanes that can be used on non-stop flights from Toronto (Canada) to Seoul (South Korea). 4. Identify the flights that can be piloted by every pilot whose salary is more than $150,000. 5. Find the names of mechanics who can maintain airplanes with a range less than 3000 miles but are not certified to work on any Airbus airplane. Find the sids of staff who make the highest salary. 6. 7. Find the sids of staff who make the second-highest salary. 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

4. Prepare a working document and an agenda for the formal meeting.

Answered: 1 week ago

Question

Identify and describe each of the major HRD functions

Answered: 1 week ago

Question

Cite some of the contemporary challenges facing HRD professionals

Answered: 1 week ago