CS460

Project# 3

 

Consider LIBRARY database schema in Figure 6.14 on page 216. Write down relational expressions and draw corresponding relational algebra expression tree for each of the following queries:

1.     How many copies of the book titled “ Oasis in the desert” are owned by the library branch named “New Spirit”.

2.    How many copies of the book titled “ Oasis in the desert” are owned by each library branch.

3.    Retrieve the card number and names of all borrowers who do not have any books checked out.

4.    Retrieve the names, addresses, and number of books checked out for all borrowers who have more than three books checked out.

5.    For each book authored or coauthored by Mark Smith, retrieve the title and the number of copies owned by the library branch whose name is Central.