Database Design
Use COMPANY database schema and specify following queries in relational algebra.
- List the last names of other employees who have the same supervisor as Franklin Wong.
- List the last names of other employees who work on some project along with Franklin Wong.
- For each employee, list his/her ssn, last name and the number of dependents he/she has.
- Find the last names of employees earning above average salary in their respective departments.
- List the last names of employees who do not work on any project controlled by their respective departments.
Use LIBRARY database schema below and specify following queries in relational algebra.
- Find all books (book titles) that are borrowed from Richardson library branch.
- Find all books (book titles) that are overdue. (Books become overdue if the Due_date is a date in the past and Return_date is null)
- Retrieve the names of all borrowers who have overdue books.
- For each library branch (branch name), find total number of books that are overdue.
- Retrieve the names of all borrowers who do not have any books checked out.
- For each book that is checked out from the Richardson library branch and whose Due_date is today, retrieve the book title, the borrowers name, and the borrowers address.
- For each library branch, retrieve the branch name and the total number of books loaned out from that branch.
- Retrieve the names, addresses, and number of books checked out for all borrowers who have more than five books checked out.
* Assume we add one additional attribute to BOOK_LOANS table with name Return_date. When a book is borrowed, Return_date takes initial value of NULL.
You can solve the questions on paper and send the pictures of your solutions. Make sure to include all pictures in one single file (word document or pdf file) and denote question numbers for your solutions.
All questions except question #6 are 8 points. Question #6 is 4 points.
Reviews
There are no reviews yet.