Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the given Relational database schema for a LIBRARY database. The primary key of each relation is underlined. BOOK (Bookld, Title, PublisherName, PublishingYear) BOOK_AUTHORS (Bookld,
Consider the given Relational database schema for a LIBRARY database. The primary key of each relation is underlined. BOOK (Bookld, Title, PublisherName, PublishingYear) BOOK_AUTHORS (Bookld, AuthorName) PUBLISHER (Name, Address, Phone) LIBRARY_BRANCH (Branchld, BranchName, Address) BOOK_COPIES (Bookld, Branchld, No_of_Copies) BORROWER (CardNo, Name, Address, Phone) BOOK_LOANS (Bookld, Branchld, CardNo, Dateout, ReturnDate) Specify the following queries in SQL2 on the same given database schema: a) List titles of all books authored by Deitel" published in the last five years (2001-2006), and owned by the "Central" library ("Central" is a library branch name). b) List titles of all books that are available in the "Rare Books" branch and not available in the "Central" branch ("Central" and "Rare Books" are library branch names). c How many book copies of each publisher in each library branch? d) Retrieve library branches that have more than 20 books checked out during the first ten days of December 2006, and not yet returned back to the library branch (ReturnDate not yet recorded). e) Retrieve authors who have books published only in the current year (2006). f) Create a view to get the total number of books in each year for each author. g) Redo query (e) using the created view
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started