Considering the relational database schema of a library management system shown below. If a book is...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Considering the relational database schema of a library management system shown below. If a book is borrowed by a borrower, a corresponding record will be inserted in the BOOK LOANS table. Please write the following queries using relational algebra expressions (NO SCORE WILL BE GIVEN FOR SQL). BOOK Book ID Title Publisher ID Category AUTHORS Book ID Author name Gender Nationality PUBLISHER Publisher ID Publisher_name Country City LIBRARY BRANCH Branch ID Branch_name City BOOK STORAGE Book ID Branch ID Quantity BORROWERS Card NO BOOK LOANS Book ID Branch ID Card NO Date out Due_date Status Phone Name Gender City 1. Find the names of the borrowers who have book borrowing records. (4 points) 2. Retrieve the titles of the books written by the female authors. (4 points) 3. List the name of each author and total number of books written by the author. (8 points) 4. List the name of the borrowers who are currently borrowing more than three books. (Borrowing books have status of 'out' in BOOK_LOANS table.) (8 points) 5. Find the book ID of the favorite book (borrowed most) in the last year. (8 points) 6. Find the CardNo of the borrowers who have read all the books written by 'J. K. Rowling' (8 points) Considering the relational database schema of a library management system shown below. If a book is borrowed by a borrower, a corresponding record will be inserted in the BOOK LOANS table. Please write the following queries using relational algebra expressions (NO SCORE WILL BE GIVEN FOR SQL). BOOK Book ID Title Publisher ID Category AUTHORS Book ID Author name Gender Nationality PUBLISHER Publisher ID Publisher_name Country City LIBRARY BRANCH Branch ID Branch_name City BOOK STORAGE Book ID Branch ID Quantity BORROWERS Card NO BOOK LOANS Book ID Branch ID Card NO Date out Due_date Status Phone Name Gender City 1. Find the names of the borrowers who have book borrowing records. (4 points) 2. Retrieve the titles of the books written by the female authors. (4 points) 3. List the name of each author and total number of books written by the author. (8 points) 4. List the name of the borrowers who are currently borrowing more than three books. (Borrowing books have status of 'out' in BOOK_LOANS table.) (8 points) 5. Find the book ID of the favorite book (borrowed most) in the last year. (8 points) 6. Find the CardNo of the borrowers who have read all the books written by 'J. K. Rowling' (8 points)
Expert Answer:
Related Book For
Fundamentals Of Database Systems
ISBN: 9780133970777
7th Edition
Authors: Ramez Elmasri, Shamkant Navathe
Posted Date:
Students also viewed these databases questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
: Transcellular fluid is Specialized type of intercellular fluid O Found in confined space O includes fluid in synovial C 2+3 None of the following O
-
Refer to the International Journal of Production Economics (Vol. 172, 2016) study of U.S. military jamming attacks on wireless networks used by terrorists, Exercise 2.8 (p. 49). Recall that 80 recent...
-
Gourmet Specialty Coffee Company (GSCC) is a distributor and processor of different blends of coffee. The company buys coffee beans from around the world and roasts, blends, and packages them for...
-
Consider a shield with an emissivity of \(\epsilon_{\mathrm{s}}\) separating two parallel plates as shown in Fig. 19.11. Assume that the shield is adiabatic and that there is no net loss of heat....
-
The following is a list of account titles and amounts (dollars in millions) from a recent annual report of Hasbro, Inc., a leading manufacturer of games, toys, and interactive entertainment software...
-
X. Consider the graph of the function f(x) = 5x - 8x. Find the slope of the secant that joins the points on the graph given by x=-2 and x = 3. Determine the average rate of change as x changes from...
-
A perishable dairy product is ordered daily at a particular supermarket. The product, which costs $1.19 per unit, sells for $1.65 per unit. If units are unsold at the end of the day, the supplier...
-
What is interesting about AMC company (either historical or going forward)? How are the company's financial ratios or WACC? Was there any surprising? Were there any red flags or concerns? How would...
-
What do you find interesting in this reading assignment? Summarize the point of interest and then discuss why you find it interesting.
-
. How is the formula for the volume of a sphere derived, and what is it?
-
Jones Inc. and Jeffrey Inc. form a jointly owned partnership, called JJ. Under the partnership agreement, both Jones and Jeffrey have joint control over the joint venture and have rights to the...
-
Let U = {a, b, c, d, e, f, g, h), A = {a, b, d, e, g}, B = {b, c, e}, and C = {b, e, g}. Locate all eight elements of U in a three-loop Venn diagram, and then list the elements in the following sets....
-
What do you think Joseph Conrad is saying in his opening note to the reader? Syd Field says that screenwriting is a craft that occasionally rises to the level of art. Respond to this quote. His tone,...
-
While evaluating an Internal Control system in an IT environment an auditor should first understand the Control Activities in IT System. Explain with suitable examples the different Control...
-
Will the prediction interval always be wider than the estimation interval for the same value of the independent variable? Briefly explain.
-
What are the main characteristics of NOSQL systems in the areas related to distributed systems and distributed databases?
-
What is flow control as a security measure? What types of flow control exist?
-
Define topic modeling.
-
Bethany, who weighs 560 N, lies in a hammock suspended by ropes tied to two trees. One rope makes an angle of 45 with the ground; the other makes an angle of 30. Find the tension in each of the ropes.
-
In the Skycoaster amusement park ride, riders are suspended from a tower by a long cable. A second cable then lifts them until they reach the starting position indicated in Figure P5.3. The lifting...
-
A dump truck, whose bed is made of steel, holds an old steel watering trough. The bed of the truck is slowly raised until the trough begins to slide. What is the acceleration of the trough as it...
Study smarter with the SolutionInn App