Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Consider the following relation schemas. Primary keys are underlined. Musicians ssn, name, Registers the ssn of musicians and their annuallncome)...

Problem 1: Use (1) relational algebra, (2) calculus and (3) SQL to express the following queries.

  1. Find the instruments (InstID) played by a musician named 'John'.
  2. Find the instruments (InstID) played by every musicians whose name is 'John'
  3. Find the instruments (InstID) played only by musicians whose name is 'John',
  4. i.e., are not played by any musician with a different name.
  5. Find the titles of the albums produced by musicians who play guitar or piano
  6. (iname='guitar' or 'piano').
  7. Find the musicians who played both song1 (songID='song1') and song2
  8. (songID='song2').
  9. Find the musician(s) with the highest annual income.
  10. Find the musicians who earn more than every other musician.

Problem 2: Use SQL to express the following queries:

  1. Find all the pairs of musicians (give names) who share an address.
  2. Find the songs that are not performed by any musician.
  3. Find the musicians (names) who played all the songs written by 'John' (musician
  4. author name = 'John').
  5. Find the musicians who perform a song they have authored
  6. Find the musicians who perform all songs they have authored
  7. Find the musicians who have authored all songs they perform
  8. Find the musicians who perform only songs they have authored, i.e., do not
  9. perform any songs they have not authored.
Consider the following relation schemas. Primary keys are underlined. Musicians ssn, name, Registers the ssn of musicians and theirannuallncome) names and annual incomes. lInstruments(instrID, iname, key) lRegisters instruments. . Registers which musicians play which(—1—) - I 1Plays ssn mstrID ms en ts Registers songs and which albums theySongsAppears(songID, appear. Every song must have exactly oneauthorSSN, title, albumldentifier) author who is a musician, and appears inexactly one album. . Registers where musicians live and whichL1ves(ssn, address, phone)phones they use. lPlace(address, otherlnfo) lRegister all addresses.Perform son ID ssn Register which songs are performed by whlchLg—’—) mus101ans AlbumProducer(ssn,albumldentifier, copyrightDate,speed, title) Registers albums and their producers (whoare musicians).
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question