Create the following views using the Where clause; Do not use joins! 16. List al
ID: 3836922 • Letter: C
Question
Create the following views using the Where clause; Do not use joins!
16. List all books that patrons are waiting for with the book number, title, patron number, name, and branchname.
17. Show all the reviews for each book with the book number, title, review, reviewer name, and date of thereview.
18. Show all the categories for each book with the book number, title, category number, and category name.
19. Show all the books for each category with the category number, category name, book number, and book title.
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 NAMEExplanation / Answer
16
select b.book_id, b.book_title, p.parton_umber, p.first_name, br.branch_name from book b, patron p, branch br, waitlist w where w.book_id = b.book_id and w.patron_id = p.patron_id and w.branch_id = br.branch_id
17
select b.book_id, b.title, r.review, rr.first_name, r.review_date from book b, review r, reviewer rr where r.book_id = b.book_id and r.reviewer_id = rr.reviewer_id group by b.book_id
18
select b.book_id, b.title, c.category_id, c.category_name from book b, category c, book_category bc where bc.book_id = b.book_id and bc.category_id = c.category_id group by b.book_id
19
select b.book_id, b.title, c.category_id, c.category_name from book b, category c, book_category bc where bc.book_id = b.book_id and bc.category_id = c.category_id group by c.category_id
I hope this will help yo. Incase you have doubt, pleae let me know. I shall try my best to resolve all your issues
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.