I insufficiency succor with this enactment. Please right enactment operator ce each investigation and expound why the repartee is what it is.
Consider a library database with the coercionthcoming schema (where primitive keys are in parenthesis):
Book( (bookID), ISBN, denomination, doer, publish-year, kind)
Member((memberID), (lastname), (firstname), discourse, phone-number, word)
CurrentLoan((memberID), (bookID), loan-date, due-date)
History((memberID), (bookID), (loan-date), return-date)
Members can attribute bulks from the library. The sum of bulks they can attribute is worded by the “limit” arena of the Member aspect. The kind of a bulk includes creation, non-fiction, children’s and intimation. The CurrentLoan board represents the instruction encircling bulks that are currently checked extinguished. When the bulk is returned to the library, the chronicles succeed be removed from CurrentLoad aspect, and succeed be inserted into History aspect with the return-date. A library may hold late than undivided delineation of the similar bulk, in which event each delineation has its hold bulkID, still perfect copies divide the similar ISBN.
Express each of the coercionthcoming tasks in relational algebra.
(5 pts) Find the ISBN and denomination of perfect the bulks doered Arthur Miller.
(8 pts) List the bulkID and denomination of perfect the bulks that are currently checked extinguished by John Smith. Do referable right any true associate in this interrogation.
(8 pts) Find the original indicate and latest indicate of the members who are either currently attributeing bulk “Da Vinci Code” or hold attributeed it in the late.
(6 pts) Find the memberID, original indicate, and latest indicate of the members who hold never attributeed any bulks.
(8 pts) List the original and latest indicates of members who hold attributeed (either currently or in the late) perfect the bulks in the library that are doered by Arthur Miller. If some bulks doered by Arthur Miller hold multiple copies, he or she must hold attributeed at smallest undivided delineation of each of Arthur Miller’s bulks.
(5 pts) Find the whole sum of bulks ce each kind (transcribe a uncombined interrogation ce this investigation).
WHERE doer = ‘Arthur Miller’
SELECT Bulk.bookID, Bulk.title
WHERE (Member.firstindicate = ‘John’ AND Member.lastindicate = ‘Smith’ and Member.memberID = CurrentLoan.memberID)
SELECT bulkID as id
WHERE denomination = ‘Da Vinci Code’
SELECT Member.firstname, Member.lastname
FROM Member, Bulk, 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