Answer to Question #228853 in Computer Networks for Sandile Mhlongo

Question #228853

Consider the following relations from a Richfield database. Write relational algebra expression for each statement using symbolic notations.

Books (bid, title, publisher, year)

Students (sid, sname, major, age)

Authors (aid, aname, aaddress)

Borrows (bid, sid, date)

2.2.1 List the title & year of each book. (2)

2.2.2 Find all information about students whose major is Java. (2)

2.2.3 List all students with the books they can borrow. (2)

2.2.4 Obtain all the books published by McGraw-Hill before 2019. (2)

2.2.5 Rename aname in the relation Authors to name. 


1
Expert's answer
2021-08-24T16:42:48-0400

i)

List the title & year of each book.

select title,year from book;

"\\pi_{(title,year)}Book"


ii)

Find all information about students whose major is Java.

select * from Students where major='java';

"\\sigma_{(major='java')}Student"


iii)

List all students with the books they can borrow.

select s.id,b.id from student as s, borrow as b
where s.id=b.id;

"STUDENTS \\times BOOKS"

iv)

Obtain all the books published by McGraw-Hill before 2019.

 select * from books where publisher='McGraw-Hill' and year=1990

"\\sigma_{(publisher='McGraw-Hill' \\wedge year='1990')}(Books)"


v)


Rename a name in the relation Authors to name.

"\\rho_{(Authors(Name,Address))}(AUTHORS)"



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS