Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following schema: ALBUM(aID, AlbumTitle, Year, Price) COMPOSITION(AlbumID, RecordingID, SongNumber) RECORDING(rID, SongTitle, Year) AUTHOR(AuthorName, SongTitle) SINGER(SingerName, RecordingID) Write SQL statements to create the tables

Given the following schema: ALBUM(aID, AlbumTitle, Year, Price) COMPOSITION(AlbumID, RecordingID, SongNumber) RECORDING(rID, SongTitle, Year) AUTHOR(AuthorName, SongTitle) SINGER(SingerName, RecordingID)

Write SQL statements to create the tables (including primary and foreign keys, where applicable): 1. Album, Composition, and Author

Formulate SQL queries to find:

1. Albums released between 1970 and 1973, inclusive, showing the album title

2. Singers (bands) that have released a song between 1970 and 1975, inclusive, showing the singer name

3. Singer-songwriters, that is people (bands) that sang the song they wrote, whose name starts with "B" or "P"

4. Singers that are not authors

5. Albums containing at least one song for which the recording year is not known

6. Albums for which the year of recording is known for all songs composing the album

7. Albums containing at least two songs recorded in different years

8. Albums containing at least 5 songs, showing the album title

9. Both: the authors that never sang a song, and the singers that never wrote a song. Show the name of these people.

10. Albums with the highest number of songs, showing for each album: the title and the number of songs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions