The following tables form part of a Library database held in an RDBMS: Book (ISBN, title, edition, year) BookCopy (copyNo, ISBN, available) Borrower (borrowerNo, borrowerName, borrowerAddress) BookLoan (copyNo, dateOut, dateDue, borrowerNo) where Book contains details of book titles in the library and the ISBN (International Standard Book Number) is the key. BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a foreign key identifying the book title. Borrower contains details of library members who can borrow books and borrowerNo is the key. BookLoan contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower.

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter1: Overview Of Database Concepts
Section: Chapter Questions
Problem 5HOA: Access path A database table is composed of records and fields hold data. Data is stored in records....
icon
Related questions
Question

Based on the table provided, write the following statements in sql queries.

The following tables form part of a Library database held in an RDBMS:
Book (ISBN, title, edition, year)
BookCopy (copyNo, ISBN, available)
Borrower (borrowerNo, borrowerName, borrowerAddress)
BookLoan (copyNo, dateOut, dateDue, borrowerNo)
where
Book
contains details of book titles in the library and the ISBN
(International Standard Book Number) is the key.
BookCopy contains details of the individual copies of books in the library and
copyNo is the key. ISBN is a foreign key identifying the book title.
Borrower contains details of library members who can borrow books and
borrowerNo is the key.
BookLoan contains details of the book copies that are borrowed by library
members and copyNo/dateOut forms the key. borrowerNo is a
foreign key identifying the borrower.
Transcribed Image Text:The following tables form part of a Library database held in an RDBMS: Book (ISBN, title, edition, year) BookCopy (copyNo, ISBN, available) Borrower (borrowerNo, borrowerName, borrowerAddress) BookLoan (copyNo, dateOut, dateDue, borrowerNo) where Book contains details of book titles in the library and the ISBN (International Standard Book Number) is the key. BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a foreign key identifying the book title. Borrower contains details of library members who can borrow books and borrowerNo is the key. BookLoan contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower.
1. List all details of books with 'Database' related titles published between year 2012 to 2020.
2. List the copies of the book titled 'Lord of the Rings'.
3. List many copies of ISBN '01-321-52306-7' are there? Give any new column an alias.
4. List the library members who are expected to return their books that are due on -30-Apr-2021'.
5. List library members who have not borrowed any books yet in 2021. Show only the borrowerNo.
6. For copies of books that are available ('Y' for available), show their ISBN and number of copies.
7. Sort them according to descending order of number of copies. Give any new column an alias.
Transcribed Image Text:1. List all details of books with 'Database' related titles published between year 2012 to 2020. 2. List the copies of the book titled 'Lord of the Rings'. 3. List many copies of ISBN '01-321-52306-7' are there? Give any new column an alias. 4. List the library members who are expected to return their books that are due on -30-Apr-2021'. 5. List library members who have not borrowed any books yet in 2021. Show only the borrowerNo. 6. For copies of books that are available ('Y' for available), show their ISBN and number of copies. 7. Sort them according to descending order of number of copies. Give any new column an alias.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning