CMPT 354 Study Guide - Quiz Guide: Foreign Key, Relational Algebra

214 views4 pages

Document Summary

Consider the following relational database: employee(employee-name, street, city) works(employee-name, company-name, salary) company(company-name, city) manages(employee-name, manager-name) Corporation: find the names, street address, and cities of residence of all employees who work for. Corporation: find the names of all employees who earn more than every employee of small bank. Corporation: assume the companies may be located in several cities. Find all companies located in every city in which small bank corporation is located. Consider the following relational database: professor(profname, deptname) deptname is a foreign key to department. deptname department(deptname, building) committee(commname, profname) profname is a foreign key to professor. profname. Consider the customer database and write an sql expression for each of the followings. Two queries are said to be equivalent if they give the same answer for every instance of the database. Consider the following database: government(name, rank, salary) politician(name, party, gender) donation(name, organization, amount) For each of the following five pairs of sql queries, determine whether they are equivalent.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents