Homework 1

Homework 1 - Write the following queries in (a) relational...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 1 CSE 132A Fall 2008 Due: by noon on Tuesday Nov 4. Turn in either in class, or by sliding under Alin’s door, CSE building room 3238. This deadline is hard! I want to publish the solutions at noon, to beneft your midterm preparation. Problem 1. [100pts] Consider the following relations containing airline Fight information: ±lights( fno: integer , From: string , to: string , distance: integer , departs: time , arrives: time ) Aircraft( aid: integer , aname: string , cruisingrange: integer ) Employees( eid: integer , ename: string , salary: integer ) Certi²ed( eid: integer , aid: integer ) Note that the Employess relation describes pilots and other kinds of employees as well; every pilot is certi²ed for some aircraft (otherwise he or she would not qualify as pilot), and only pilots are certi²ed to Fy.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Write the following queries in (a) relational algebra, (b) tuple relational calculus, (c) SQL. 1. (10 pts): ±ind the eids of pilots certi²ed for some Boeing aircraft. 2. (10 pts): ±ind the names of pilots certi²ed for some Boeing aircraft. 3. (20 pts): ±ind the aids of all aircraft that can be used on non-stop Fights from Boston to London. 4. (20 pts): Identify aids of all aircraft that can be piloted by every pilot whose salary is more than $100,000. 5. (20 pts): ±ind the names of pilots who can operate planes with a range greater than 3,000 miles but are not certi²ed on any Boeing aircraft. 6. (20 pts): ±ind the eids of employees who make the highest salary. 1...
View Full Document

This note was uploaded on 12/03/2009 for the course CSE 132A taught by Professor Alindeutsch during the Fall '08 term at UCSD.

Ask a homework question - tutors are online