






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A midterm exam for the database systems course (eel 4852) at the university of south florida, held on october 2, 2007. The exam consists of five problems, each with different sql and relational algebra queries to be solved. The document also includes instructions for the students and assumptions they are expected to make.
Typology: Exams
1 / 11
This page cannot be seen from the preview
Don't miss anything!







Consider the following schemas of a corporate database:
Empolyees( eid : integer , ename : string , age : integer , salary : real ) Works( eid : integer , did : integer , pct_time : integer ) Departments( did : integer , location : string , managerid : integer )
where the underlined attributes are primary keys. We also have the following referential integrities: In table Works , eid is a foreign key to table Employess and did is a foreign key to table Departments ; In table Departments , managerid is a foreign key to table Employees (in other words, a manager is also an employee). Write the following queries in SQL. Clearly state any assumptions you make.
Consider the following two tables:
Relation r Relation s
B C D D E F a 5 b b 10 6 b 6 a c 25 3 c 25 b b 10 5 a 5 c
Give the resulting table of the following relational algebraic operations, you should specify the schema as well as the values of all attributes for all tuples in your solutions.
Following the schemas seen in Problem II and III, write the following queries in Query-By- Example (QBE). The skeleton tables are drawn for you.
Employees eid ename age salary
Works eid did pct_time
Departments did location managerid
Employees eid ename age salary
Works eid did pct_time
Departments did location managerid
Employees eid ename age salary
Works eid did pct_time
Departments did location managerid
Conditions