in Databases
5,080 views
0 votes
0 votes

Consider the following relational schema for a library:

member(memb_no, name, dob)
books(isbn, title, authors, publisher)
borrowed(memb_no, isbn, date)


Write the following queries in relational algebra.
a. Find the names of members who have borrowed any book published
by “McGraw-Hill”.
b. Find the name of members who have borrowed all books published
by “McGraw-Hill”.
c. Find the name and membership number of members who have borrowed
more than five different books published by “McGraw-Hill”.
d. For each publisher, find the name and membership number of members
who have borrowed more than five books of that publisher.
e. Find the average number of books borrowed per member. Take into
account that if a member does not borrow any books, then that
member does not appear in the borrowed relation at all.

in Databases
5.1k views

4 Comments

$(Borrow / \Pi _{isbn}(\sigma _{publisher = "McGraw-Hill"}(Books)))$

Shaik Masthan what will be the result of this sub-query?

0
0

here / is Division operator 

therefore (Borrow / Πisbnpublisher="McGraw−Hill"(Books)))

gives the all the tuples in Borrow which has linked with every isbn of publisher="McGraw−Hill"(Books))

0
0
oh yes. thanks
0
0

1 Answer

1 vote
1 vote
Please give the answers to me

Related questions