QuestionQuestion

With the LIBRARY relational database schema, implement the following requests:

Find the number of copies of a given book that exists at a given branch
Find the name of the book with the largest number of copies on any branch (not the total across all branches)
List all the books that are out rented at the moment
List the books borrowed by a given person in the last month
List the books borrowed at the moment to customers living in a given city
Set the due date to the day after tomorrow, for a certain book borrowed from a specific branch by a particular customer
Notes:

- In the above requests, a given book will be specified by its title, a given branch is specified by its branch name and a customer (borrower) is specified by his/her name.

- You will need to find how to get the current date in Oracle and add or subtract days to/from it.

Submit the SQL statements as a text file (Notepad).

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

With the LIBRARY relational database schema used in week 1's homework, implement the following requests:

Find the number of copies of a given book that exists at a given branch
select bc.NO_OF_COPIES from
BOOK_COPIES bc, BOOK b, LIBRARY_BRANCH lb
where bc.BOOK_ID = b.BOOK_ID and bc.BRANCH_ID = lb.BRANCH_ID
and b.TITLE='&title' and lb.BRANCH_NAME='&Branch_name';

Find the name of the book with the largest number of copies on any branch (not the total across all branches)
select b.TITLE from
BOOK_COPIES bc inner join BOOK b
on bc.BOOK_ID = b.BOOK_ID
where NO_OF_COPIES = ( select MAX(NO_OF_COPIES) from BOOK_COPIES );...
$29.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Database Development Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats