Post on 10-Sep-2018
transcript
Bases de données relationnelles
iTunes Music Library<dict>
<key>Track ID</key><integer>1281</integer> <key>Name</key><string>Dazed And Confused</string> <key>Artist</key><string>Led Zeppelin</string> <key>Composer</key><string>Led Zeppelin</string> <key>Album</key><string>The Song Remains The Same</string> <key>Kind</key><string>Fichier audio AAC</string> <key>Size</key><integer>27649304</integer> <key>Total Time</key><integer>1671695</integer> <key>Year</key><integer>2007</integer> <key>BPM</key><integer>40</integer> <key>Date Modified</key><date>2007-12-27T17:34:42Z</date> <key>Date Added</key><date>2009-11-02T13:41:58Z</date> <key>Bit Rate</key><integer>128</integer> <key>Sample Rate</key><integer>44100</integer> <key>Rating</key><integer>80</integer> <key>Rating Computed</key><true/> <key>Album Rating</key><integer>80</integer> <key>Sort Album</key><string>Song Remains The Same</string> <key>Persistent ID</key><string>7C7C6699E8469B39</string> <key>Track Type</key><string>File</string> <key>File Type</key><integer>1295270176</integer><key>Location</key><string>file://localhost/Users/js/Music/iTunes/iTunes%20Music/Led% 20Zeppelin/The%20Song%20Remains%20The%20Same/Dazed%20And%20Confused.m4a</string><key>File Folder Count</key><integer>4</integer><key>Library Folder Count</key><integer>1</integer>
</dict>
iTunes Music Store
Date Titre Client Prix
1 décembre 2013 No Quarter Dupont 1,00 €
12 janvier 2014 Moog Island Durand 1,00 €
15 janvier 2014 No. 13 Baby Martin 1,00 €
16 janvier 2014 There There Martin 1,00 €
20 février 2014 Mr. Mastondont Farm Machin 1,00 €
Structure d’une table
Pilote NumPil NomPil Adresse Salaire
1 Dupond Paris 150002 Dupré Toulouse 200003 Duchamp Paris 90004 Durand Montpellier 120005 Dupond Nice 11000
nom dʼune relation
n-uplet/tuple/enregistrement
attribut
Degré : nombre dʼattributs = 4Cardinalité : nombre de tuples = 5
Structure d’une table
Titre Durée Interprète Album Genre
Comanche 2:10 Cake Motorcade Of Generosity Alternative/Punk
Ruby Sees All 3:00 Cake Motorcade Of Generosity Alternative/Punk
Up So Close 3:14 Cake Motorcade Of Generosity Alternative/Punk
Man-Sized Wreath 3:09 R.E.M. Live At The Olympia In Dublin Rock
Man-Sized Wreath 2:33 R.E.M. Accelerate Rock
This Boy 2:22 Franz Ferdinand You Could Have It So Much Better Alternative/Punk
Walk Away 3:36 Franz Ferdinand You Could Have It So Much Better Alternative/Punk
Evil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much Better Alternative/Punk
There Goes My Gun 1:50 Pixies Doolittle Alternative/Punk
Rock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity Alternative/Punk
Attributs
clé primaire ?
Éléments
Structure d’une table
identifiant Titre Durée Interprète Album Genre
1 Comanche 2:10 Cake Motorcade Of Generosity Alternative/Punk
2 Ruby Sees All 3:00 Cake Motorcade Of Generosity Alternative/Punk
3 Up So Close 3:14 Cake Motorcade Of Generosity Alternative/Punk
4 Man-Sized Wreath 3:09 R.E.M. Live At The Olympia In Dublin Rock
5 Man-Sized Wreath 2:33 R.E.M. Accelerate Rock
6 This Boy 2:22 Franz Ferdinand You Could Have It So Much Better Alternative/Punk
7 Walk Away 3:36 Franz Ferdinand You Could Have It So Much Better Alternative/Punk
8 Evil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much Better Alternative/Punk
9 There Goes My Gun 1:50 Pixies Doolittle Alternative/Punk
10 Rock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity Alternative/Punk
clé primaire
Structure d’une baseTitre Durée Interprète Album
Comanche 2:10 Cake Motorcade Of Generosity
Up So Close 3:14 Cake Motorcade Of Generosity
Man-Sized Wreath 3:09 R.E.M. Live At The Olympia In Dublin
Man-Sized Wreath 2:33 R.E.M. Accelerate
This Boy 2:22 Franz Ferdinand You Could Have It So Much Better
Evil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much Better
There Goes My Gun 1:50 Pixies Doolittle
Rock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity
table morceaux
Nom
Cake
R.E.M.
Franz Ferdinand
Pixies
table interprètes table albumsAlbum Interprète
Motorcade Of Generosity CakeFashion Nugget CakeLive At The Olympia In Dublin R.E.M.Accelerate R.E.M.Trompe le Monde PixiesYou Could Have It So Much Better Franz FerdinandDoolittle Pixies
clés étrangères
clé étrangère
Structure d’une baseidentifiant Titre Durée Interprète Album
1 Comanche 2:10 1 12 Up So Close 3:14 1 13 Man-Sized Wreath 3:09 2 34 Man-Sized Wreath 2:33 2 45 This Boy 2:22 3 66 Evil And A Heathen 2:06 3 67 There Goes My Gun 1:50 4 78 Rock 'n' Roll Lifestyle 4:14 1 1
table morceaux
identifiant Nom
1 Cake
2 R.E.M.
3 Franz Ferdinand
4 Pixies
table interprètes table albumsidentifiant Album Interprète
1 Motorcade Of Generosity 12 Fashion Nugget 13 Live At The Olympia In Dublin 24 Accelerate 25 Trompe le Monde 46 You Could Have It So Much Better 37 Doolittle 4
clés étrangères
clé étrangère
UnionNom Prénom Pays
Waters Roger UKBarbelivien Philippe FBuck Peter USAYorke Tom UKVerschuren André BAdamo Salvatore BBlack Franck USAZimmermann Robert USA
table compositeurs
table interprètes
Nom Prénom Pays
Wright Richard UKGray Félix FFrançois Jean-Pierre FYorke Tom UKHendrix Jimi USAWaters Muddy USABlack Franck USAZimmermann Robert USA
table interprètes ∪ table compositeurs
Nom Prénom Pays
Waters Roger UK
Barbelivien Philippe F
Buck Peter USA
Yorke Tom UK
Verschuren André B
Adamo Salvatore B
Black Franck USA
Wright Richard UK
Gray Félix F
François Jean-Pierre F
Hendrix Jimi USA
Waters Muddy USA
Zimmermann Robert USA
Fusion
IntersectionNom Prénom Pays
Waters Roger UKBarbelivien Philippe FBuck Peter USAYorke Tom UKVerschuren André BAdamo Salvatore BBlack Franck USAZimmermann Robert USA
table compositeurs
table interprètes
Nom Prénom Pays
Wright Richard UKGray Félix FFrançois Jean-Pierre FYorke Tom UKHendrix Jimi USAWaters Muddy USABlack Franck USAZimmermann Robert USA
table interprètes ∩ table compositeurs
Nom Prénom Pays
Yorke Tom UK
Black Franck USA
Zimmermann Robert USA
DifférenceNom Prénom Pays
Waters Roger UKBarbelivien Philippe FBuck Peter USAYorke Tom UKVerschuren André BAdamo Salvatore BBlack Franck USAZimmermann Robert USA
table compositeurs
table interprètes
Nom Prénom Pays
Wright Richard UKGray Félix FFrançois Jean-Pierre FYorke Tom UKHendrix Jimi USAWaters Muddy USABlack Franck USAZimmermann Robert USA
table interprètes - table compositeurs
Nom Prénom Pays
Waters Roger UK
Barbelivien Philippe F
Verschuren André B
Adamo Salvatore B
table compositeurs - table interprètes
Nom Prénom Pays
Wright Richard UK
Gray Félix F
François Jean-Pierre F
Hendrix Jimi USA
Waters Muddy USA
SélectionTitre Durée Interprète Album
Comanche 2:10 Cake Motorcade Of GenerosityUp So Close 3:14 Cake Motorcade Of GenerosityMan-Sized Wreath 3:09 R.E.M. Live At The Olympia In DublinMan-Sized Wreath 2:33 R.E.M. AccelerateThis Boy 2:22 Franz Ferdinand You Could Have It So Much BetterEvil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much BetterThere Goes My Gun 1:50 Pixies DoolittleRock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity
table morceaux = R
Titre Durée Interprète Album
Comanche 2:10 Cake Motorcade Of Generosity
Up So Close 3:14 Cake Motorcade Of Generosity
Rock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity
Sélection σP (R)
P est la proposition Album=”Motorcade Of
Generosity”
σ(Album=”Motorcade Of Generosity”)(morceaux)
ProjectionTitre Durée Interprète Album
Comanche 2:10 Cake Motorcade Of GenerosityUp So Close 3:14 Cake Motorcade Of GenerosityMan-Sized Wreath 3:09 R.E.M. Live At The Olympia In DublinMan-Sized Wreath 2:33 R.E.M. AccelerateThis Boy 2:22 Franz Ferdinand You Could Have It So Much BetterEvil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much BetterThere Goes My Gun 1:50 Pixies DoolittleRock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity
table morceaux = R
Titre Interprète
Comanche CakeUp So Close CakeMan-Sized Wreath R.E.M.Man-Sized Wreath R.E.M.This Boy Franz FerdinandEvil And A Heathen Franz FerdinandThere Goes My Gun PixiesRock 'n' Roll Lifestyle Cake
Projection π(R)
π(Titre, Interprète)(morceaux)
Produit cartésien de deux tables
Titre Durée Interprète Album
Comanche 2:10 Cake Motorcade Of Generosity
Up So Close 3:14 Cake Motorcade Of Generosity
Man-Sized Wreath 3:09 R.E.M. Live At The Olympia In Dublin
Man-Sized Wreath 2:33 R.E.M. Accelerate
This Boy 2:22 Franz Ferdinand You Could Have It So Much Better
Evil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much Better
There Goes My Gun 1:50 Pixies Doolittle
Rock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity
table morceaux
table albumsAlbum Interprète
Motorcade Of Generosity CakeFashion Nugget CakeLive At The Olympia In Dublin R.E.M.Accelerate R.E.M.Trompe le Monde PixiesYou Could Have It So Much Better Franz FerdinandDoolittle Pixies
x
Produit cartésien de deux tables
Titre Durée Interprète Album Album InterprèteComanche 2:10 Cake Motorcade Of Generosity Motorcade Of Generosity CakeUp So Close 3:14 Cake Motorcade Of Generosity Motorcade Of Generosity CakeMan-Sized Wreath 3:09 R.E.M. Live At The Olympia In Dublin Motorcade Of Generosity CakeMan-Sized Wreath 2:33 R.E.M. Accelerate Motorcade Of Generosity CakeThis Boy 2:22 Franz Ferdinand You Could Have It So Much Better Motorcade Of Generosity CakeEvil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much Better Motorcade Of Generosity CakeThere Goes My Gun 1:50 Pixies Doolittle Motorcade Of Generosity CakeRock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity Motorcade Of Generosity CakeComanche 2:10 Cake Motorcade Of Generosity Fashion Nugget CakeUp So Close 3:14 Cake Motorcade Of Generosity Fashion Nugget CakeMan-Sized Wreath 3:09 R.E.M. Live At The Olympia In Dublin Fashion Nugget CakeMan-Sized Wreath 2:33 R.E.M. Accelerate Fashion Nugget CakeThis Boy 2:22 Franz Ferdinand You Could Have It So Much Better Fashion Nugget CakeEvil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much Better Fashion Nugget CakeThere Goes My Gun 1:50 Pixies Doolittle Fashion Nugget CakeRock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity Live At The Olympia In Dublin R.E.M.Comanche 2:10 Cake Motorcade Of Generosity Live At The Olympia In Dublin R.E.M.Up So Close 3:14 Cake Motorcade Of Generosity Live At The Olympia In Dublin R.E.M.Man-Sized Wreath 3:09 R.E.M. Live At The Olympia In Dublin Live At The Olympia In Dublin R.E.M.Man-Sized Wreath 2:33 R.E.M. Accelerate Live At The Olympia In Dublin R.E.M.This Boy 2:22 Franz Ferdinand You Could Have It So Much Better Live At The Olympia In Dublin R.E.M.Evil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much Better Live At The Olympia In Dublin R.E.M.There Goes My Gun 1:50 Pixies Doolittle Live At The Olympia In Dublin R.E.M.Rock 'n' Roll Lifestyle 4:14 Cake Motorcade Of Generosity Live At The Olympia In Dublin R.E.M.Comanche 2:10 Cake Motorcade Of Generosity Accelerate R.E.M.Up So Close 3:14 Cake Motorcade Of Generosity Accelerate R.E.M.
morceaux x albums
=
Produit cartésien de deux tables : problèmes
• Différencier les attributs : renommage
• Éliminer les éléments vides de sens : jointure
RenommageMorceaux.Titre Morceaux.Durée Morceaux.Interprète Morceaux.Album Albums.Album Albums.Interprète
Comanche 2:10 Cake Motorcade Of Generosity Motorcade Of Generosity Cake
Up So Close 3:14 Cake Motorcade Of Generosity Motorcade Of Generosity Cake
Man-Sized Wreath 3:09 R.E.M. Live At The Olympia In Dublin Motorcade Of Generosity Cake
Man-Sized Wreath 2:33 R.E.M. Accelerate Motorcade Of Generosity Cake
This Boy 2:22 Franz Ferdinand You Could Have It So Much Better Motorcade Of Generosity Cake
Evil And A Heathen 2:06 Franz Ferdinand You Could Have It So Much Better Motorcade Of Generosity Cake
There Goes My Gun 1:50 Pixies Doolittle Motorcade Of Generosity Cake
Jointureidentifiant Titre Durée Interprète Album
1 Comanche 2:10 1 1
2 Up So Close 3:14 1 1
3 Man-Sized Wreath 3:09 2 3
4 Man-Sized Wreath 2:33 2 4
5 This Boy 2:22 3 6
6 Evil And A Heathen 2:06 3 6
7 There Goes My Gun 1:50 4 7
8 Rock 'n' Roll Lifestyle 4:14 3 6
table morceaux
identifiant Nom
1 Cake
2 R.E.M.
3 Franz Ferdinand
4 Pixies
table interprètes
Condition : morceaux.Interprète = interprètes.identifiant
Jointureidentifiant Titre Durée Interprète Album identifiant Nom
1 Comanche 2:10 1 1 1 Cake
2 Up So Close 3:14 1 1 1 Cake
3 Man-Sized Wreath 3:09 2 3 2 R.E.M.
4 Man-Sized Wreath 2:33 2 4 2 R.E.M.
5 This Boy 2:22 3 6 3 Franz Ferdinand
6 Evil And A Heathen 2:06 3 6 3 Franz Ferdinand
7 There Goes My Gun 1:50 4 7 4 Pixies
8 Rock 'n' Roll Lifestyle 4:14 1 1 3 Franz Ferdinand
(morceaux.Interprète = interprètes.identifiant)
morceaux interprètes
Combinaison : séances des films avec H. Bogart