A Gentle Introduction to

SQL


Pick an engine:

Music DatabasegoogleBase de données De Musique

There are two tables in this database. The album table contains details of two hundred music CD's taken from googleIl y a deux tables dans cette base de données. La table d'album contient des détails deux cents de la musique CD's prise de AmazongoogleAmazon .

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. googleLes voies de chaque album sont énumérées dans une table séparée track. Les deux tables sont liées en utilisant le champ du champ track.album qui se relie au champ d'album.asin.

track
album disk 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.googleL'JOIN de ces deux tables inclut une rangée pour chaque voie. Il inclut des champs des deux tables. Des champs de la table d'ablum sont répétés.

album JOIN track ON (asin=album)
ASIN TITLE ARTIST PRICE RELEASE LABEL RANK ALBUM DISK 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
...