Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For the following questions, use the relational schema defined as follow. Book B

ID: 3724457 • Letter: F

Question

For the following questions, use the relational schema defined as follow. Book BookCopy Borrower BookLoan (ISBN, title, author, edition, year) (copyNo, ISBN, available) (borrowerNo, borrowerName, borrowerAddress) (copyNo, dateOut, dateDue, borrowerNo) where Book contains details of book titles in the library and the ISBN is the primary key. contains details of the individual copies of books in the library and copyNo is the primary key. ISBN is a foreign key identifying the book title. contains details of library members who can borrow books and borrowerNo is the primary key contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the primary key. borrowerNo is a foreign key identifying the borrower. BookCopy Borrower BookLoan 1. List all book titles. 2. List all borrower details, in alphabetical order of borrower name. 3. List all book titles published in the year 2005 written by "J. K. Rowling" 4. How many copies of ISBN "0-7475-8108-8" are there? 5. List all copies of the book with "Harry Potter" keyword in title that are available for borrowing. 6. List the names of borrowers who currently have the book title "Lord of the Rings" on loan. 7. List the names of borrowers who will overdue books today. 8. List the top 10 most-borrowed books in the library.

Explanation / Answer

1) SELECT title from BOOK;
2) SELECT borrowerName from Borrower DSC borrowerName;
3) SELECT title FROM Book WHERE year=2005 AND author= 'J.K, Rowling';
4) SELECT count(copyNo) FROM BookCopy WHERE ISBN='0-7475-8108-8';
5) SELECT BC.copyNo FROM Book B,BookCopy BC WHERE B.ISBN=BC.ISBN AND BC.available='YES' AND B.title='%Harry Potter%';

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote