Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relations for airline flight information: Flights(fno: integer, from: string, to: string, distance: integer, departs: time, arrives: time) Aircraft(aid: integer, name: string, cruisingrange:

Consider the following relations for airline flight information: Flights(fno: integer, from: string, to: string, distance: integer, departs: time, arrives: time) Aircraft(aid: integer, name: string, cruisingrange: integer) Certified(eid: integer, aid: integer) Employees(eid: integer, name: string, salary: integer)

Note that (1) the Employees relation describes and other types of employees, (2) every pilot is certified for some aircraft in order being qualified as a pilot, and (3) only pilots are certified to fly.

Write the following queries in relational algebra or tuple relational calculus.

a) Retrieve the eids of pilots certified for some Boeing aircraft.

b) Retrieve the names of pilots certified for some Boeing aircraft.

c) Retrieve the aids of all aircraft that can be used on non-stop flights from Boston to Miami.

d) Identify the flights that can be piloted by every pilot whose salary is more than $110,000.

e) Retrieve the names of pilots who can operate planes with a range greater than 3,500 miles but are not certified on any Boeing aircraft.

f) Retrieve the eids of employees who make the highest salary.

g) Retrieve the eids of employees who are certified for the largest number of aircraft.

h) Retrieve the eids of employees who are certified for exactly four aircraft.

i) Calculate the total amount of salaries paid to employees.

j) Is there a sequence of flights from Jackson to Hannover? Each flight in the sequence is required to depart from the city that is the destination of the previous flight; the first flight must leave Jackson, the last flight must reach Hannover, and there is no restriction on the number of intermediate flights. Your query must determine whether a sequence of flights from Jackson to Hannover exists for ANY input Flights relation instances.

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions