Overview
This lab helps you practice more SQL statements that manipulate the database, such as insert, update, and deleting records.
Submit your SQL .sql
file on Blackboard.
Requirements
- Create a view
mpeg_tracks
that displays all tracks with MPEG audio file format. Display track name (track_name
) artist name (artist_name
), composer, album title (album_title
), and media type (media_type
). Sort results in alphabetical order by track name.
- Add a track below to the database:
- Track Title: The Ocean
- Album: The Song Remains The Same (Disc 1)
- Artist: Led Zeppelin
- Media Type: MPEG audio file
- Genre: Rock
- Composer: John Bonham/John Paul Jones/Robert Plant
- Milliseconds: 248000
- Bytes: 7990000
- Unit Price: 0.99
- Make the following changes to the track added above:
New Bytes: 8998765
New Unit Price: 1.99 - Delete track 20 Flight Rock by BackBeat from the database.
- Display how many tracks there are for each album. Show album ID, album title (
album_title
), and track count (track_count
).- Note: some of your counts might be different due to added or deleted records during in-class exercises.
- Note: some of your counts might be different due to added or deleted records during in-class exercises.