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

Create the following views using the Where clause; Do not use joins! 12. List th

ID: 3836894 • Letter: C

Question

Create the following views using the Where clause; Do not use joins!

12. List the books that each patron currently has checked out with the patron number, patron name, telephonenumber, book number, and title. Order by patron name and use meaningful grouping.

13. Same as #12 except with the addition of the branch number and name.

14. Same as #12 except that the list should be for any book the patron has ever checked out.

15. Same as #12 except for all books that are past due along with the past due fee.

COUNTY LIBRARY SYSTEM Use the following relations for the SQL queries for this project. D, LIBRARY NAME, STREETLADDRESS, CITY, STATE, ZIPCODE, PHONE, LIBRARY LIBRARY MANAGER NAME) BRANCH BRANCH ID, BRANCH NAME, STREET ADDRESS, CITY, STATE, ZIPCODE, PHONE, BRANCH MANAGER, LIBRARYLID) FK L BRARY ID LIBRARY (PUBLISHER ID, PUBLISHER NAME, STREETLADDRESS, STATE ZIPCODE, PHONE) CITY, PUBLISHER BOOK BOOK D, BOOK TITLE, PUBLICATION DATE, PUBLISHER ID, PRECIS) FK PUBLISHER ID PUBLISHER (AUTHORID, FIRST NAME, LAST NAME, DATE oF BIRTH, DATE OF DEATH) AUTHOR BOOK AUTHOR BOOK D. AUTHOR ID FK BOOK ID BOOK FK AUTHOR ID AUTHOR COPY ID, BOOK D, COST, BRANCH ID) COPY FK BOOK ID BOOK FK BRANCH ID BRANCH CATEGORY CATEGORY ID, CATEGORY NAME

Explanation / Answer

1.

CREATE VIEW BOOK_VIEW AS SELECT PATRON_ID,FIRST_NAME,LAST_NAME,PHONE,BOOK_ID,BOOK_TITLE FROM PATRON P,BOOK B,CHECKOUT C,COPY CP WHERE C.PATRON_ID=P.PATRON_ID AND C.COPY_ID=CP.COPY_ID AND CP.BOOK_ID=B.BOOK_ID ORDER BY P.PATRON_ID;

In this first it checks the pattern id from checkout table and pattron table then it checks the copy id from checkout table with the copy table and then it takes checks the bookid in the copy table with booktable then it lists all the respected columns mentions with the information which comes from the condition.

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