BOOK Book_id Title Publisher_name 4a
1. (40 marks) Consider the LIBRARY relational database schema which is used to keep track of books, borrowers, and book loans. Write down the SQL statement for each of the following queries: Retrieve the names of books that are not borrowed by anyone. Find out the borrowers who only borrowed books from the Riverside branch. Find out the borrowers who borrowed books from all branches. Retrieve the average number of books borrowed by each borrower.
BOOK_AUTHORS Book_id Author_name
PUBLISHER Name Address Phone
BOOK_COPIES Book_id Branch_id copies
BOOK_LOANS Book_id Branch_id Card_no Date_out Due_date
LIBRARY_BRANCH Branch_id Branch_name Address
BORROWER Card_no Name Address Phone