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

Use the following five tables to answer all questions in this section. The prima

ID: 3627350 • Letter: U

Question

Use the following five tables to answer all questions in this section. The primary keys are underlined. The foreign keys have the same name as the primary key in another table.
Assume that peerAdvisor ID is a reference to another student (the student id of another student).
Publisher(publishername, address, city, state)
Book(isbn, title, datePublished, publishername)
BookCopy(bookID, isbn, condition, datePurchased, price)
BookCheckout(bookID, studentID, dateIn, dateOut)
Student(studentID, firstname, lastname, city, state, email, peerAdvisorID)
Write relational algebra commands to do the following tasks.
1. Output the First Name and Last Name for all students from New Jersey.
2. Output the bookid, title, and condition of all book copies.
3. Output the first and last name of students along with the title of every book they have checked out.
4. Output the average price of all books.
5. Output the average price of books checked out by a student from New Jersey.
6. Output the name of each publisher and the number of books published by that publisher
7. Output the names of all students and the name of their peer advisor.
8. Output the bookid for all book copies that have been checked out by every student.
9. Output the bookid for all book copies that have never been checked out by a student.

Explanation / Answer

Dear, 1) Find First Name and Last Name for all students from New Jersey.        Firstname,lastname(city="New Jersey")(student) 2) Find bookid, title, and condition of all book copies        Bookid,title,condtion(Book.isbn=Bookcopy.isbn(Book*Bookcopy)) 3) Find first and last name of students along with the title of every book they have checked out       Firstname,lastname,title(student.studentid=bookcheckout.studentid(sudent*bookcheckout)
                                                                                      ^ bookcheckout.bookid=Bookcopy.bookid(Bookcopy*bookcheckout)                                                                                            ^  Bookcopy.isbn=Book.isbn(Bookcopy*Book))
4)Find average price of all books         Avg(price)(bookcopy) Note: Only one question per post, as per the Cramster rule. Please Ask remaining Questions in other post.
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