Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description Exercise 1 : Specify the following queries on the COMPANY relational database schema, using the relational operators discussed in this chapter. Also show the

image text in transcribed
image text in transcribed
Description Exercise 1 : Specify the following queries on the COMPANY relational database schema, using the relational operators discussed in this chapter. Also show the result of each query as it would apply to the database state + Write them in Tuple calculus . a) Retrieve the names of employees in department 5 who work more than 10 hours per week on the 'ProductX' project. b) (b) List the names of employees who have a dependent with the same first name as themselves. c) Find the names of employees that are directly supervised by 'Franklin Wong'. d) For each project, list the project name and the total hours per week (by all employees) spent on that project. e) Retrieve the names of employees who work on every project. f) Retrieve the names of employees who do not work on any project. g) For each department, retrieve the department name, and the average salary of employees working in that department. h) Retrieve the average salary of all female employees. i) Find the names and addresses of employees who work on at least one project located in Houston but whose department has no location in Houston. List the last names of department managers who have no dependents Consider the LIBRARY relational schema shown in Figure 6.14, which is used to keep track of books, borrowers, and book loans. Referential integrity constraints are shown as directed ares in Figure 6.14, as in the notation of Figure 3.7. Write down relational expressions for the following queries on the LIBRARY database: a) How many copies of the book titled The Lost Tribe are owned by the library branch whose name is "Sharpstown"? b) How many copies of the book titled The Lost Tribe are owned by each library branch? c) Retrieve the names of all borrowers who do not have any books checked out. d) For each book that is loaned out from the "Sharpstown" branch and whose DueDate is today, retrieve the book title, the borrower's name, and the borrower's address. e) For each library branch, retrieve the branch name and the total number of books loaned out from that branch. f) Retrieve the names, addresses, and number of books checked out for all borrowers who have more than five books checked out. g) For each book authored (or co-authored) by "Stephen King", retrieve the title and the number of copies owned

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

A study based on

Answered: 1 week ago