onsider the LIBRARY relational database schema shown in Figure 8.14, which is used to keep track of books, borrowers, and book loans. Referential integrity constraints are shown as directed arcs in Figure 8.14, as in the notation of Figure 5.7. Write down relational expressions also write the queries in SQL statements. for the following queries Figure 8.18 will be attached  a. How many copies of the book titled The Lost Tribe are owned by the library branch whose name is ‘Sharpstown’? c. Retrieve the names of all borrowers who do not have any books checked out.

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter7: Database Administration
Section: Chapter Questions
Problem 6CAT: Create the following indexes: a. Create an index named TRIP_INDEX1 on the TRIP_NAME column in the...
icon
Related questions
Question

FileStructure and Database Course

Consider the LIBRARY relational database schema shown in Figure 8.14, which is used to keep track of books, borrowers, and book loans. Referential integrity constraints are shown as directed arcs in Figure 8.14, as in the notation of Figure 5.7. Write down relational expressions also write the queries in SQL statements. for the following queries

Figure 8.18 will be attached 

a. How many copies of the book titled The Lost Tribe are owned by the library branch whose name is ‘Sharpstown’?

c. Retrieve the names of all borrowers who do not have any books checked out.

e. For each library branch, retrieve the branch name and the total number of books loaned out from that branch.

g. For each book authored (or coauthored) by Stephen King, retrieve the title and the number of copies owned by the library branch whose name is Central.

BOOK
Book_id Title Publisher_name
BOOK_AUTHORS
Book_id Author_name
PUBLISHER
Name Address Phone
BOOK_COPIES
Book id Branch_id No_of_copies
BOOK_LOANS
Book_id Branch_id Card_no Date_out Due_date
LIBRARY_BRANCH
Branch_id Branch_name Address
BORROWER
rd_no Name Address Phone
Transcribed Image Text:BOOK Book_id Title Publisher_name BOOK_AUTHORS Book_id Author_name PUBLISHER Name Address Phone BOOK_COPIES Book id Branch_id No_of_copies BOOK_LOANS Book_id Branch_id Card_no Date_out Due_date LIBRARY_BRANCH Branch_id Branch_name Address BORROWER rd_no Name Address Phone
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

can you write them also in relational algrebra

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

Write them in relational expressions/algebra

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Intermediate SQL concepts
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
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage