I insufficiency acceleration obedient these scrutinys. I’ve gotten the ceemost uncompounded and am having disturbance with uncompoundeds succeeding. If I attpurpose how a rare are duncompounded I achieve be able to meliorate discern it.
Consider a library database with the aftercited schema (where primary keys are bolded):
Book(bookID, ISBN, heading, perpetrator, publish-year, state)
Member(memberID, ultimatename, ceemostname, discourse, phone-number, boundary)
CurrentLoan(memberID, bookID, loan-date, due-date)
History(memberID, bookID, loan-date, return-date)
Members can hypothecate capacitys from the library. The compute of capacitys they can hypothecate is boundaryed by the “limit” ground of the Member narration. The state of a capacity includes creation, non-fiction, children’s and everyusion. The CurrentLoan board represents the instruction abextinguished capacitys that are currently checked extinguished. When the capacity is returned to the library, the annals achieve be removed from CurrentLoad narration, and achieve be inserted into History narration with the return-date. A library may confess further than uncompounded representation of the identical capacity, in which occurrence each representation has its confess capacityID, except every copies distribute the identical ISBN. Express each of the aftercited tasks in relational algebra.
(5 pts) Find the ISBN and heading of every the capacitys perpetratored Arthur Miller.
(8 pts) List the capacityID and heading of every the capacitys that are currently checked extinguished by John Smith. Do referable attributable attributable attributable correction any original link in this scrutiny.
(8 pts) Find the ceemost designate and ultimate designate of the members who are either currently hypothecateing capacity “Da Vinci Code” or confess hypothecateed it in the late.
(6 pts) Find the memberID, ceemost designate, and ultimate designate of the members who confess never hypothecateed any capacitys.
(8 pts) List the ceemost and ultimate designates of members who confess hypothecateed (either currently or in the late) every the capacitys in the library that are perpetratored by Arthur Miller. If some capacitys perpetratored by Arthur Miller confess multiple copies, he or she must confess hypothecateed at definite uncompounded representation of each of Arthur Miller’s capacitys.
(5 pts) Find the whole compute of capacitys ce each state (transcribe a uncompounded scrutiny ce this scrutiny).
Given narration is:
Book(bookID, ISBN, heading, perpetrator, publish-year, state)
Member(memberID, ultimatename, ceemostname, discourse, phone-number, boundary)
CurrentLoan(memberID, capacityID, loan-date, due-date)
History(memberID, capacityID, loan-date, return-date)
Find the ISBN and heading of every the capacitys perpetratored Arthur Miller?
select ISBN, heading from Capacity where perpetrator=’Arthur Miller’;
List the capacityID and heading of every the capacitys that are currently checked extinguished by John Smith. Do referable attributable attributable attributable correction any original link in this scrutiny.
select B.bookID, B.heading from Capacity B,Member M,CurrentLoan C where B.bookID=C.bookID and M.memberID=C.memberID and M.firstname=’John Smith’;
Find the ceemost designate and ultimate designate of the members who are either currently hypothecateing capacity “Da Vinci Code” or confess hypothecateed it in the late.
select M.firstname, M.lastdesignate from Capacity B,Member M,CurrentLoan C where B.bookID=C.bookID and M.memberID=C.memberID and B.title=’Da Vinci Code’;
Find the whole compute of capacitys ce each state ?
select isbn, capacitytitle, solidity(occurrence when status=’available’ then 1 else 0 purpose) as utility, number(*) as whole
from Capacity;
group by isbn, capacitytitle