Question: Music Rental Agency Relational Database Schema client ( clientID , firstName, lastName, phone, address ) cd ( cdCode , cdTitle, numberSold, year, groupCode ) availableCopy
Music Rental Agency Relational Database Schema
clientclientID firstName, lastName, phone, address
cdcdCode cdTitle, numberSold, year, groupCode
availableCopycdCode seqNum
rentedBycdCode seqNum, clientID, fromDate, endDate, pricePerDay
songsongCode songTitle
musicalGroupgroupCode groupName
artistartistiD firstName, lastName, yearBorn
topCDsodCode year, rating
composedOf cdCode songCode, trackNumber
topSongssongCod year, rating
membergroupCode artistiD, fromDate, toDate
writtenBysongCode artistlD
Queries
The output schema for the query is given in parentheses following the query specification.
Which songs appeared on the CD rated number one in
Order the results in ascending order on track number.
songCode songTitle, trackNumber
For each group in the database, find the number of rated in the top
Order the results in descending order of the number of top
groupCode groupName, numberOfTopCDs
What is the yearly maximum, the minimum, and average number of tracks on CDs published since the year Order the results in chronological order by year.
year maxNumber, minNumber, avgNumber
Find the list of musical groups such that every client in Detroit rented at least one of their CDsThe same division query as appeared in HW
groupCode groupName
Which artists that have written a top song are currently not a member of any group?
Order the results alphabetically by last name and first name.
artistID firstName, lastName, yearBorn
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
