Album

From SQLZoo

Music Database

There are two tables in this database. The album table contains details of two hundred music CD's taken from Amazon.

album
asin title artist price release label rank
B00000255F Born to Run Bruce Springsteen 13.98 1975-08-25 Sony 521
B000002UAU Sgt. Pepper's Lonely Hearts Club Band The Beatles 13.49 1967-06-01 Capitol 218
...

The tracks from each album are listed in a separate table track. The Two tables are linked using the field track.album field which relates to the album.asin field.

track
album dsk posn song
B00000255F 1 1 Thunder Road
B00000255F 1 2 Tenth Avenue Freeze-Out
B00000255F 1 3 Night
B00000255F 1 4 Backstreets
B00000255F 1 5 Born to Run
...
B000002UAU 1 1 Sgt. Pepper's Lonely Hearts Club Band
B000002UAU 1 2 With a Little Help from My Friends
B000002UAU 1 3 Lucy in the Sky With Diamonds
B000002UAU 1 4 Getting Better
B000002UAU 1 5 She's Leaving Home
...

The JOIN of these two tables includes one row for each track. It includes fields from both tables. Fields from the ablum table are repeated.

album JOIN track ON (asin=album)
ASIN TITLE ARTIST PRICE RELEASE LABEL RANK ALBUM DSK POSN SONG
B000002UAU Sgt. Pepper's Lonely Hearts Club Band The Beatles 13.49 01-JUN-67 Capitol 218 B000002UAU 1 1 Sgt. Pepper's Lonely Hearts Club Band
B000002UAU Sgt. Pepper's Lonely Hearts Club Band The Beatles 13.49 01-JUN-67 Capitol 218 B000002UAU 1 2 With a Little Help from My Friends
B000002UAU Sgt. Pepper's Lonely Hearts Club Band The Beatles 13.49 01-JUN-67 Capitol 218 B000002UAU 1 3 Lucy in the Sky With Diamonds
B000002UAU Sgt. Pepper's Lonely Hearts Club Band The Beatles 13.49 01-JUN-67 Capitol 218 B000002UAU 1 4 Getting Better
B000002UAU Sgt. Pepper's Lonely Hearts Club Band The Beatles 13.49 01-JUN-67 Capitol 218 B000002UAU 1 5 Fixing a Hole
B00000255F Born to Run Bruce Springsteen 13.98 25-AUG-75 Sony 521 B00000255F 1 1 Thunder Road
B00000255F Born to Run Bruce Springsteen 13.98 25-AUG-75 Sony 521 B00000255F 1 2 Tenth Avenue Freeze-Out
B00000255F Born to Run Bruce Springsteen 13.98 25-AUG-75 Sony 521 B00000255F 1 3 Night
B00000255F Born to Run Bruce Springsteen 13.98 25-AUG-75 Sony 521 B00000255F 1 4 Backstreets
B00000255F Born to Run Bruce Springsteen 13.98 25-AUG-75 Sony 521 B00000255F 1 5 Born to Run
...