Question

Consider the following relation tables (fields with underline is primary keys): Author(Name, Country) Book(ISBN, Title, Publisher, Subject) Writes(Name, ISBN) Write the relational algebra for the following query: a. (2 points) Give the titles of all books with Art subject Solution: b. (2 points) Give the name of all authors who publish with Harding Solution: (2 points) Give the name of all authors who have written books with Science subject Solution: c. d. (3 points) Give the titles of all books written by U.S. authors Solution: e. (3 points) Give the titles, ISBNs, and publishers of all books with Art subject whose authors live in the US. Solution:

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

given by:

a. select title from book where subject="art";

Explanation:

it returns the all books which match the subject by Art.

b. select name from writes where ISBN in(select ISBN from Book where publisher= " Harding");

Explanation:

at this time name and publisher are as of two different tables first we obtain isbn from book which match the publisher Harding and then as of that we select names beginning writes table

c. select name from writes where ISBN in(select ISBN from Book where subject= " Science");

Explanation:

at this time name and subject are from two unusual tables first we take ISBN from book which matches the topic science and then from that we select names from write table

d. select title from book where ISBN in(select ISBN from writs where Name in (select name from Author where country="U.S"));

Explanation:

at this point titles and country are from two dissimilar tables first we take person's name from Auther which matches the state U.S and then as of that take ISBN on or after writes and then we obtain titles as of book

e. select title, ISBN, publisher from Book where subject="Art" and ISBN in (select ISBN from writes where name in (select name from Auther where country ="U.S"));

Explanation:

at this time titles,ISBN and authers are from two dissimilar tables primary we take name from Auther which match the country U.S and then as of that take ISBN from writes and after that we take titles,ISBN,Publishers from book which matches topic art.

Add a comment
Know the answer?
Add Answer to:
Consider the following relation tables (fields with underline is primary keys): Author(Name, Country) Book(ISBN, Title, Publisher,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT