Léon NSHIMYUMUKIZA, MD, M.SC ( Cand .) ( [email protected] )
Planning [email protected]
description
Transcript of Planning [email protected]
![Page 1: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/1.jpg)
11
PlanningPlanning [email protected]
AmphiAmphi Jeudi 15h Jeudi 15h 16h30 16h30
Notes de cours !Notes de cours !
TD : 11 SéancesTD : 11 Séances
2 devoirs en TD2 devoirs en TDMercredi 24 marsMercredi 24 marsMercredi 12 maiMercredi 12 mai
![Page 2: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/2.jpg)
2
Supports et outils en ligne
Site Web
ybertini.free.fr/bdd
![Page 3: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/3.jpg)
3
Bases de Données
Introduction aux Bases de Données et au langage SQL
![Page 4: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/4.jpg)
4
Informations
Consulter
Stocker
Rôle des Bases de Données (BDD)
![Page 5: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/5.jpg)
5
Plan
I - Définitions et notations II - Modèle relationnel III- Langage SQL
![Page 6: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/6.jpg)
6
I- Définitions (1)
Base de données (BDD) :
ensemble de donnéesorganisées suivant un modèleconsultable par de nombreux utilisateurs
![Page 7: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/7.jpg)
7
Exemple de BDD minimaliste
Annuaire téléphoniqueNOM PRENOM TEL.
Benoit Jean 04 76 45 65 56
Bernard Francois 04 76 56 68 32
Bourdan Pierre 04 76 23 54 66
Tableau
Libre accès
![Page 8: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/8.jpg)
8
I- Définitions (2)
SGBD pour support informatique(Système de Gestion de Bases De Données)
Ensemble de logiciels capables :concevoir, enregistrer, consulter les données sur
support informatiquesécuriser les données :
intégrité du contenu droits d 'accès
![Page 9: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/9.jpg)
9
Exemples de SGBD
Microsoft QUERY Microsoft ACCESS
Deux SGBD tout en un
![Page 10: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/10.jpg)
10
Domaines d 'utilisation
SGBD (Système de Gestion de Bases De Données)
Traiter un grand nombre d'objets similairesclients pour les assurancespatients dans les hôpitaux livres dans les bibliothèquescomptes dans les banques…
![Page 11: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/11.jpg)
11
Plan
I - Définitions II - Modèle relationnel III- Langage SQL
![Page 12: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/12.jpg)
13
Modèle Relationnel (2)BDD relationnelle
BDD relationnelle = collection de relations relation = tableau = table
RELATIONRELATION
RELATIONRELATIONRELATIONRELATION
RELATIONRELATIONRELATIONRELATION
RELATIONRELATIONRELATIONRELATION
RELATIONRELATIONRELATIONRELATION
![Page 13: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/13.jpg)
15
Modèle Relationnel (4)La Relation - définition
ANNUAIRE
NOM PRENOM TEL
Benoit Jean 04 76 45 65 56
Benoit Francois 04 76 56 68 32
Bourdan Jean 04 76 23 54 66
Bouvier Jacqueline 04 76 18 34 35
Nom : ANNUAIRE
Attributs :(NOM, PRENOM, TEL)
Occurrences :• 4 abonnés • décrits suivant valeurs d'attributs
![Page 14: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/14.jpg)
16
Modèle Relationnel (5)Clé de relation
Clé d 'une relation: un ou plusieurs attribut(s) si on fixe une valeur de l’attribut clé
pas deux occurrences possèdent cette valeur
Question : quelle est la clé d 'ANNUAIRE ? Nom Prenom Tel
NOM PRENOM TEL
Benoit Jean 04 76 45 65 56
Benoit Francois 04 76 56 68 32
Bourdan Jean 04 76 23 54 66
Bouvier Jacqueline 04 76 18 34 35
![Page 15: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/15.jpg)
17
Modèle Relationnel (5)Clé de relation
Clé d 'une relation: un ou plusieurs attribut(s) si on fixe une valeur de l’attribut clé
pas deux occurrences possèdent cette valeur
Question : quelle est la clé d 'ANNUAIRE ? Nom Prenom Tel
NOM PRENOM TEL
Benoit Jean 04 76 45 65 56
Benoit Francois 04 76 56 68 32
Bourdan Jean 04 76 23 54 66
Bouvier Jacqueline 04 76 18 34 35
![Page 16: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/16.jpg)
18
Modèle Relationnel (5)Clé de relation
Clé d 'une relation: un ou plusieurs attribut(s) si on fixe une valeur de l’attribut clé
pas deux occurrences possèdent cette valeur
Question : quelle est la clé d 'ANNUAIRE ? Nom Prenom Tel
NOM PRENOM TEL
Benoit Jean 04 76 45 65 56
Benoit Francois 04 76 56 68 32
Bourdan Jean 04 76 23 54 66
Bouvier Jacqueline 04 76 18 34 35
![Page 17: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/17.jpg)
19
Modèle Relationnel (6)Clé de relation
Clé d 'une relation: un ou plusieurs attribut(s) si on fixe une valeur de l’attribut clé
pas deux occurrences possèdent cette valeur
Question : quelle est la clé d 'ANNUAIRE ? Nom Prenom Tel
NOM PRENOM TEL
Benoit Jean 04 76 45 65 56
Benoit Francois 04 76 56 68 32
Bourdan Jean 04 76 23 54 66
Bouvier Jacqueline 04 76 18 34 35
1 n° téléphone 1 seul abonné
![Page 18: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/18.jpg)
20
Modèle Relationnel (7)Schéma de relation
Schéma d 'une relation :
Nom relation ( clé, attribut1, attribut2, … )
Schéma de l'ANNUAIRE :
ANNUAIRE ( TEL ), NOM, PRENOM=
ANNUAIRE ( NOM, PRENOM, TEL )
![Page 19: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/19.jpg)
21
Exemple de BDDCompagnie d 'Aviation
Polycopié page 2
3 relations : vol, pilote et avion. schéma des relations :
vol(numvol, depart, arrivee, numav, numpil, jdep, hdep,jarr, harr)
pilote(numpilote,nom,prenom) Avion(numavion, type, cap)
Schéma de la BDD relationnelle (à completer …)
![Page 20: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/20.jpg)
22
Plan
I - Définitions II - Modèle relationnel III- Langage SQL
définitionun exemple de requête et traitementrequêtes typiques
![Page 21: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/21.jpg)
24
Structured Query Langage (SQL) langage d'interrogation (Anglais) inventé par IBM (1973)
SQL - langage relationnel Définition
Requête SQL
Réponse : relation
SGBD
![Page 22: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/22.jpg)
25
Requête en Français
Exemple :
Nom du pilote prénommé Antoine ?
Démarche Traduction en SQL : 1. relations (tables) mises en jeu2. attributs3. conditions de filtrage
valeurs d’attribut imposées aux occurrences
Dupuis
PRENOM = 'Antoine'
![Page 23: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/23.jpg)
26
Requête en SQLDéfinition
3 lignes (SFW)
Select <liste attributs à afficher réponse>
From <listes relations>
Where <condition de filtrage des occurrences>;
![Page 24: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/24.jpg)
27
Requête en SQLExemple
En Français :Nom du pilote prénommé Antoine ?
Traduction SQL :
SelectFromWhere
pilote.nompilotepilote.prenom = 'Antoine';
attribut relation.attribut
'Antoine' ≠ pilote.nom
<listes relations>
<liste attributs à afficher résultat>
<condition de filtrage des occurrences>;
![Page 25: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/25.jpg)
28
Requête en SQL Execution par SGBD
Select pilote.nomFrom piloteWhere pilote.prenom = 'Antoine' ;
nom
Dupuis
RELATION_REP
![Page 26: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/26.jpg)
29
Requête en SQL Traitement des Requêtes par SGBD
1. Choix des relations 2. Sélection des occurrences 3. Projection des attributs
Select pilote.nomFrom piloteWhere pilote.prenom = 'Antoine' ;
![Page 27: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/27.jpg)
30
Traitement des Requêtes1. Choix des relations
Select pilote.nomFrom piloteWhere pilote.prenom = 'Antoine';
numvol depart arrivee numav numpil jdep hdep jarr harrV0001V0002V0003V0004V0005V0006V0007V0008
ParisLondresBerlinLondresBruxellesBerlinParisNew York
San FranciscoMoscouMadridMadridRomeAmsterdamBruxellesParis
A0001A0003A0002A0004A0006A0005A0001A0001
P0002P0001P0003P0006P0005P0001P0002P0003
15/05/9915/05/9915/05/9916/05/9916/05/9916/05/9916/05/9917/05/99
10:0010:3011:1506:2010:0014:3018:0003:00
16/05/9915/05/9915/05/9916/05/9916/05/9916/05/9916/05/9917/05/99
09:3017:0018:0009:3015:1017:0020:0021:30
numpilote nom prenomP0001P0002P0003P0004P0005P0006
DupuisSimonFrançoisAndréArthurMathieu
AntoineGeorgesLucGeorgesLouisFrançois
numavion type capA0001A0002A0003A0004A0005A0006
Boeing 747Airbus 320Airbus 300Boeing 737DC 10Boeing 747
420300280250120410
VOL
PILOTE
AVION
![Page 28: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/28.jpg)
31
Traitement des Requêtes2. Sélection des occurrences
Select pilote.nomFrom piloteWhere pilote.prenom = 'Antoine';
numpilote nom prenomP0001P0002P0003P0004P0005P0006
DupuisSimonFrançoisAndréArthurMathieu
AntoineGeorgesLucGeorgesLouisFrançois
![Page 29: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/29.jpg)
32
Traitement des Requêtes (3)3. Projection des attributs
Select pilote.nomFrom piloteWhere pilote.prenom = 'Antoine';
numpilote nom prenomP0001 Dupuis Antoine
![Page 30: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/30.jpg)
33
Traitement des Requêtes (4)Résultat
Select pilote.nomFrom piloteWhere pilote.prenom = 'Antoine'
nomDupuis
![Page 31: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/31.jpg)
34
Plan
I - Définitions II - Modèle relationnel III- Langage SQL
définitionun exemple de requête et traitementrequêtes typiques
Projection Sélection jointure
![Page 32: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/32.jpg)
36
Requêtes typiquesProjection
R1 : Nom et prénom de tous les pilotes ?
Select
From
Where
pilote
pilote.nom, pilote.prenom
nom prenomDupuisSimonFrançoisAndréArthurMathieu
AntoineGeorgesLucGeorgesLouisFrançois
Select attribut1 , attribut2
![Page 33: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/33.jpg)
37
Requêtes typiques (1) Sélection
R2 : Attributs des pilotes de prénom Georges?
Select
From
Where
pilote
*
pilote.prenom = 'Georges'
numpilote nom prenomP0002P0004
SimonAndré
GeorgesGeorges
![Page 34: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/34.jpg)
38
Conditions élémentaires (1)
Syntaxe : <Attribut> <Opérateur> <Valeur>
Opérateurs de comparaisons=, <, <=, >, >=, <>
Valeurmots : 'Georges'nombre : 12.6dates : { d '1999-05-15' }
Conditions élémentaires : pilote.prenom = 'Georges'avion.cap > 300
’minus’ ≠ ’MAJUS’
![Page 35: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/35.jpg)
39
Conditions élémentaires (1) Trouver les erreurs
1.vol.depart = "Londres"
2.vol.numpil = P0002
3.avion.cap < '300'
4.avion.type = 'AIRBUS 300'
5.avion.type = 'Airbus300'
6.vol.jdep > {d 1999-05-15}
7.vol.numavion = 'A0002'
8.avions.numavion = 'A0002'
9.vol.numav ≠ 'A0002'
vol.depart = 'Londres'
vol.numpil = 'P0002'
avion.cap < 300
avion.type = 'Airbus 300'
avion.type = 'Airbus 300'
vol.jdep > {'d 1999-05-15'}
vol.numav = 'A0002'
avion.numavion = 'A0002'
vol.numav <> 'A0002'
![Page 36: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/36.jpg)
49
Conditions composées (2) Combinaisons logiques :
AND : vol.depart = 'Londres' And vol.arrivee = 'Madrid'
Question : numéro des vols qui vérifient cette condition ?
OR :avion.type = 'Airbus 300' Or avion.type = 'Airbus 320'
Question : numéro des avions qui vérifient cette condition ?
V0004
A0002
A0003
![Page 37: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/37.jpg)
50
Conditions composées (2)
vol.arrivee = 'Madrid' And vol.arrivee = 'Rome'
avion.cap <= 200 Or avion.cap >= 300
vol.depart = 'Londres' And vol.arrivee = 'Moscou' Or vol.arrivee = 'Madrid'
Vols qui atterrissent à la fois à Madrid et Rome !!
Avions de moins de 200 places ou de plus de 300 places.
A0001
A0002
A0005
A0006
![Page 38: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/38.jpg)
51
Conditions composées (2)
vol.arrivee = 'Madrid' And vol.arrivee = 'Rome'
avion.cap <= 200 Or avion.cap >= 300
(vol.depart = 'Londres' And vol.arrivee = 'Moscou' ) Or vol.arrivee = 'Madrid'
Vols qui atterrissent à la fois à Madrid et Rome !!
Vols Londres Moscou ou ? MadridV0002
V0003
V0004
Avions de moins de 200 places ou de plus de 300 places.
A0001
A0002
A0005
A0006
![Page 39: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/39.jpg)
52
Conditions composées (2)Vols pour Madrid ou Rome
Avions de capacité entre 200 et 300
Vols de Londres vers Moscou ou Madrid
vol.arrivee = 'Madrid' Or vol.arrivee = 'Rome'
avion.cap >= 200 And avion.cap <= 300
vol.depart = 'Londres' And( vol.arrivee = 'Moscou' Or vol.arrivee = 'Madrid' )
OR après AND … AND ( … OR …)
100<= avion.cap <=200 n’existe pas
vol.arrivee='Madrid' Or 'Rome' n’existe pas
![Page 40: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/40.jpg)
53
Requêtes typiques (2) Sélection
R3 ' : Attributs des vols décollant pour Madrid le 15/05/99 ?
Select
From
Where
vol*
vol.arrivee='Madrid' And vol.jdep={d '1999-05-15'}
numvol depart arrivee numav numpil jdep hdep jarr harrV0003 Berlin Madrid A0002 P0003 15/05/99 11:15 15/05/99 18:00
![Page 41: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/41.jpg)
54
Requêtes typiquesJointure
R6 ' : Nom du pilote du vol V0001 ?
numvol depart arrivee numav numpil jdep hdep jarr harr V0001 V0002 V0003 ...
Paris Londres Berlin ...
San Francisco Moscou Madrid ...
A0001 A0003 A0002 ...
P0002 P0001 P0003 ...
15/05/99 15/05/99 15/05/99 ...
10:00 10:30 11:15 ...
16/05/99 15/05/99 15/05/99 ...
09:30 17:00 18:00 ...
numpilote nom prenom P0001 P0002 P0003 P0004 P0005 P0006
Dupuis Simon François André Arthur Mathieu
Antoine Georges Luc Georges Louis François
référence
![Page 42: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/42.jpg)
55
Schéma de BDDSchéma des relations + références
numvol depart arrivee numav numpil jdep hdep jarr harr V0001 V0002 V0003 ...
Paris Londres Berlin ...
San Francisco Moscou Madrid ...
A0001 A0003 A0002 ...
P0002 P0001 P0003 ...
15/05/99 15/05/99 15/05/99 ...
10:00 10:30 11:15 ...
16/05/99 15/05/99 15/05/99 ...
09:30 17:00 18:00 ...
numpilote nom prenomP0001P0002P0003P0004P0005P0006
DupuisSimonFrançoisAndréArthurMathieu
AntoineGeorgesLucGeorgesLouisFrançois
numavion type capA0001A0002A0003A0004A0005A0006
Boeing 747Airbus 320Airbus 300Boeing 737DC 10Boeing 747
420300280250120410
![Page 43: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/43.jpg)
56
Requêtes typiquesJointure naturelle R5 : Attributs des vols et des pilotes des vols?
Select
From
Wherepilote, vol
*
pilote.numpilote = vol.numpilnumpilote nom prenom numvol depart arrivee numav numpil jdep hdep jarr harr
P0002P0001P0003P0006P0005P0001P0002P0003
SimonDupuisFrançoisMathieuArthurDupuisSimonFrançois
GeorgesAntoineLucFrançoisLouisAntoineGeorgesLuc
V0001V0002V0003V0004V0005V0006V0007V0008
ParisLondresBerlinLondresBruxellesBerlinParisNew York
San FranciscoMoscouMadridMadridRomeAmsterdamBruxellesParis
A0001A0003A0002A0004A0006A0005A0001A0001
P0002P0001P0003P0006P0005P0001P0002P0003
15/05/9915/05/9915/05/9916/05/9916/05/9916/05/9916/05/9917/05/99
10:0010:3011:1506:2010:0014:3018:0003:00
16/05/9915/05/9915/05/9916/05/9916/05/9916/05/9916/05/9917/05/99
09:3017:0018:0009:3015:1017:0020:0021:30
![Page 44: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/44.jpg)
57
Requêtes typiquesProduit cartésien
Select *
From pilote, vol
numpilote nom prenom numvol depart arrivee numav numpil jdep hdep jarr harr
P0001P0002P0003P0004P0005P0006
DupuisSimonFrançoisAndréArthurMathieu
AntoineGeorgesLucGeorgesLouisFrançois
V0001V0001V0001V0001V0001V0001
ParisParisParisParisParisParis
San FranciscoSan FranciscoSan FranciscoSan FranciscoSan FranciscoSan Francisco
A0001A0001A0001A0001A0001A0001
P0002P0002P0002P0002P0002P0002
15/05/9915/05/9915/05/9915/05/9915/05/9915/05/99
10:0010:0010:0010:0010:0010:00
16/05/9916/05/9916/05/9916/05/9916/05/9916/05/99
09:3009:3009:3009:3009:3009:30
... ... ... ... ... ... ... ... ... ... ... ...P0001P0002P0003P0004P0005P0006
DupuisSimonFrançoisAndréArthurMathieu
AntoineGeorgesLucGeorgesLouisFrançois
V0008V0008V0008V0008V0008V0008
New YorkNew YorkNew YorkNew YorkNew YorkNew York
ParisParisParisParisParisParis
A0001A0001A0001A0001A0001A0001
P0003P0003P0003P0003P0003P0003
17/05/9917/05/9917/05/9917/05/9917/05/9917/05/99
03:0003:0003:0003:0003:0003:00
17/05/9917/05/9917/05/9917/05/9917/05/9917/05/99
21:3021:3021:3021:3021:3021:30
Page 4
![Page 45: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/45.jpg)
58
Requêtes typiquesProduit cartésien
Select *
From pilote, vol
Where pilote.numpilote = vol.numpilnumpilote nom prenom numvol depart arrivee numav numpil jdep hdep jarr harr
P0001P0002P0003P0004P0005P0006
DupuisSimonFrançoisAndréArthurMathieu
AntoineGeorgesLucGeorgesLouisFrançois
V0001V0001V0001V0001V0001V0001
ParisParisParisParisParisParis
San FranciscoSan FranciscoSan FranciscoSan FranciscoSan FranciscoSan Francisco
A0001A0001A0001A0001A0001A0001
P0002P0002P0002P0002P0002P0002
15/05/9915/05/9915/05/9915/05/9915/05/9915/05/99
10:0010:0010:0010:0010:0010:00
16/05/9916/05/9916/05/9916/05/9916/05/9916/05/99
09:3009:3009:3009:3009:3009:30
... ... ... ... ... ... ... ... ... ... ... ...P0001P0002P0003P0004P0005P0006
DupuisSimonFrançoisAndréArthurMathieu
AntoineGeorgesLucGeorgesLouisFrançois
V0008V0008V0008V0008V0008V0008
New YorkNew YorkNew YorkNew YorkNew YorkNew York
ParisParisParisParisParisParis
A0001A0001A0001A0001A0001A0001
P0003P0003P0003P0003P0003P0003
17/05/9917/05/9917/05/9917/05/9917/05/9917/05/99
03:0003:0003:0003:0003:0003:00
17/05/9917/05/9917/05/9917/05/9917/05/9917/05/99
21:3021:3021:3021:3021:3021:30
![Page 46: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/46.jpg)
59
Requêtes typiquesJointure
NE PAS OUBLIER CONDITION DE JOINTURE
2 tables 1 condition de jointure 3 tables 2 conditions de jointure
combinées par AND
![Page 47: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/47.jpg)
60
Encore des requêtes
R6' : Nom du pilote du vol V0001 ?
Select
From
Where
pilote, vol
pilote.nom
pilote.numpilote = vol.numpil And vol.numvol = 'V0001'
nom
Simonjointure AND condition
![Page 48: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/48.jpg)
61
Encore des requêtes
numvol type cap nom
V0001V0002V0003V0004V0005V0006V0007V0008
Boeing 747Airbus 300Airbus 320Boeing 737Boeing 747DC 10Boeing 747Boeing 747
420280300250410120420420
SimonDupuisFrançoisMathieuArthurDupuisSimonFrançois
R8 : Numéro des vols, type et capacité des avions, et nom de leurs pilotes ?
![Page 49: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/49.jpg)
62
Encore des requêtes
R8 : Numéro des vols, type et capacité des avions, et nom de leurs pilotes ?
Select
From
Where
pilote, vol, avion
vol.numvol, avion.type, avion.cap, pilote.nom
pilote.numpilote = vol.numpil And vol.numav = avion.numavion
![Page 50: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/50.jpg)
64
Numéro des avions Boeing 747
Numéro des vols au départ de Paris
Numéro des vols qu’effectuent les Boeing 747
Nom des pilotes des Boeing 747
numavion
A0001
A0006
numvol
V0001
V0007
numvol
V0008
V0007
V0001
V0005
nom
François
Simon
Simon
Arthur
![Page 51: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/51.jpg)
65
Numéro des avions Boeing 747 Numéro des vols au départ de Paris Numéro des vols qu’effectuent les Boeing
747 Nom des pilotes des Boeing 747
![Page 52: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/52.jpg)
66
Numéro des avions Boeing 747 Numéro des vols au départ de Paris Numéro des vols qu’effectuent les Boeing
747 Nom des pilotes des Boeing 747
![Page 53: Planning yves.bertini@yahoo.fr](https://reader036.fdocuments.us/reader036/viewer/2022081501/56813f92550346895daa8209/html5/thumbnails/53.jpg)
67
Numéro des avions Boeing 747 Numéro des vols au départ de Paris Numéro des vols qu’effectuent les Boeing
747 Nom des pilotes des Boeing 747