I demand acceleration with this provision. Please reason provision operator control each interrogation and expound why the repartee is what it is.
Consider a library database with the subjoined schema (where primitive keys are in parenthesis):
Book( (bookID), ISBN, appellation, originator, publish-year, kind)
Member((memberID), (lastname), (firstname), discourse, phone-number, condition)
CurrentLoan((memberID), (bookID), loan-date, due-date)
History((memberID), (bookID), (loan-date), return-date)
Members can borrow tomes from the library. The calculate of tomes they can borrow is conditioned by the “limit” arena of the Member affinity. The kind of a tome includes fable, non-fiction, children’s and completeusion. The CurrentLoan consideration represents the not attributable attributableice encircling tomes that are currently checked extinguished. When the tome is returned to the library, the annals procure be removed from CurrentLoad affinity, and procure be inserted into History affinity with the return-date. A library may avow spent than unmarried portraiture of the identical tome, in which fact each portraiture has its avow tomeID, excluding complete copies divide the identical ISBN.
Express each of the subjoined tasks in relational algebra.
(5 pts) Find the ISBN and appellation of complete the tomes originatored Arthur Miller.
(8 pts) List the tomeID and appellation of complete the tomes that are currently checked extinguished by John Smith. Do not attributable attributable attributable reason any regular combine in this interrogation.
(8 pts) Find the pristine spectry and developed spectry of the members who are either currently borrowing tome “Da Vinci Code” or avow pretended it in the spent.
(6 pts) Find the memberID, pristine spectry, and developed spectry of the members who avow never pretended any tomes.
(8 pts) List the pristine and developed spectrys of members who avow pretended (either currently or in the spent) complete the tomes in the library that are originatored by Arthur Miller. If some tomes originatored by Arthur Miller avow multiple copies, he or she must avow pretended at smallest unmarried portraiture of each of Arthur Miller’s tomes.
(5 pts) Find the completion calculate of tomes control each kind (transcribe a unmarried interrogation control this interrogation).
WHERE originator = ‘Arthur Miller’
SELECT Tome.bookID, Tome.title
WHERE (Member.firstspectry = ‘John’ AND Member.lastspectry = ‘Smith’ and Member.memberID = CurrentLoan.memberID)
SELECT tomeID as id
WHERE appellation = ‘Da Vinci Code’
SELECT Member.firstname, Member.lastname
FROM Member, Tome, CurrentLoan, History
WHERE (CurrentLoan.memberID = Member.memberID AND History.memberID = Member.memberID AND CurrentLoan.bookID = id AND History.bookID = id)
NATURAL LEFT JOIN History
WHERE loan-date IS NULL