Question

clef name opus_num key Writes Composer Piece score 0 Orchestral Playsln Instrument quantity lyrics

Write relational algebra expressions to retrieve the following information from the music database. Use the most appropriate operations for each query. In particular, use joins when appropriate.

(a) For each composer, give the composer’s name and the total number of pieces that (s)he has written, including composers who have not written any pieces.

(b) For each type of instrument, give the instrument type together with the total number of orchestral pieces which use that type of instrument.

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

a)

\piname, name g count(pous_num) ( Composer \Join Piece)

b)

\pitype, type g count(pous_num) ( Instrument \Join Orchestral )

\pi --- projection operation

\Join ---- join

g is group by

Do ask if any doubt. Please upvote

Add a comment
Know the answer?
Add Answer to:
Write relational algebra expressions to retrieve the following information from the music database. Use the most appropriate operations for each query. In particular, use joins when appropriate. (a)...
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