

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


COP5725 Database Management Systems - Fall 2006 Homework 3 Due: 09/21/
Exercise 5.3 The following relations keep track of airline flight information:
Flights( flno: integer, from: string, to: string, distance: integer, departs: time, arrives: time, price: real) Aircraft( aid: integer, aname: string, cruisingrange: integer) Certified( eid: integer, aid: integer) Employees( eid: integer, ename: string, salary: integer)
Note that the Employees relation describes pilots and other kinds of employees as well; every pilot is certified for some aircraft, and only pilots are certified to fly. Write each of the following queries in SQL.
Exercise 5.4 Consider the following relational schema. An employee can work in more than one
department; the pct_time field of the Works relation shows the percentage of time that a given
employee works in a given department.
Emp( eid: integer, ename: string, age: integer, salary: real) Works( eid: integer, did: integer, pct_time: integer) Dept( did: integer, dname: string, budget: real, managerid: integer)
Write the following queries in SQL: