Question: Hi, This is a question for those with strong understanding of relational databases and relational algebra. I have already completed homeowrk but would like to

Hi,

This is a question for those with strong understanding of relational databases and relational algebra. I have already completed homeowrk but would like to compare answers. Could you please provide working with your answer. Thank you very much

Hi, This is a question for those with strong understanding of relational

Question 1 Consider the following database schema for a university library system. 4 Marks BOOK BookID, Title, Publisher) PK: BookID) AUTHOR BookID, AuthorID, Name PK: BookID, AuthorID FK: BookID] S BOOK BookID STUDENT (StudentID, Name, Address, Phone, DoB) PK: StudentID) LIBRARY-BranchlD, BookID PK: BranchID FK: BookID S BOOK BookID LOAN-BookD, StudentID, BranchID, StartDate, DueDate PK: BookID, StudentID, BranchID, Start Date FK: BooklD BOOK BookID StudentID STUDENT StudentID], BranchID] S LIBRARY BranchID] Answer the following questions using relational algebra expressions. You are encouraged to use relational algebra expressions to represent intermediate results if needed 1.1 Find all the libraries which have at least one book written by John Tolkien. List the BranchIDs of these libraries (0.5 Mark) 1.2 Find all the students who have borrowed the book titled The Two Towers. List their StudentIDs and phone numbers. (0.5 Mark) 1.3 Find all the students who have never borrowed any books. List their StudentIDs and names (1 Mark) 1.4 Find all pairs of students who have borrowed the same book from the same library. List these pairs of StudentIDs (1 Mark) 1.5 Find all the students who always borrow books from the same library. List their StudentIDs. (1 Mark) Question 1 Consider the following database schema for a university library system. 4 Marks BOOK BookID, Title, Publisher) PK: BookID) AUTHOR BookID, AuthorID, Name PK: BookID, AuthorID FK: BookID] S BOOK BookID STUDENT (StudentID, Name, Address, Phone, DoB) PK: StudentID) LIBRARY-BranchlD, BookID PK: BranchID FK: BookID S BOOK BookID LOAN-BookD, StudentID, BranchID, StartDate, DueDate PK: BookID, StudentID, BranchID, Start Date FK: BooklD BOOK BookID StudentID STUDENT StudentID], BranchID] S LIBRARY BranchID] Answer the following questions using relational algebra expressions. You are encouraged to use relational algebra expressions to represent intermediate results if needed 1.1 Find all the libraries which have at least one book written by John Tolkien. List the BranchIDs of these libraries (0.5 Mark) 1.2 Find all the students who have borrowed the book titled The Two Towers. List their StudentIDs and phone numbers. (0.5 Mark) 1.3 Find all the students who have never borrowed any books. List their StudentIDs and names (1 Mark) 1.4 Find all pairs of students who have borrowed the same book from the same library. List these pairs of StudentIDs (1 Mark) 1.5 Find all the students who always borrow books from the same library. List their StudentIDs. (1 Mark)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!