Problem

Consider the LIBRARY relational database schema shown in Figure, which is used to keep tra...

Consider the LIBRARY relational database schema shown in Figure, which is used to keep track of books, borrowers, and book loans. Referential integrity constraints are shown as directed arcs in Figure, as in the notation of Figure 5.7. Write down relational expressions for the following queries:

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 Due_date 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 coauthored) by Stephen King, retrieve the title and the number of copies owned by the library branch whose name is Central.

A relational database scheme for a LIBRARY database.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search