Vous êtes sur la page 1sur 6

République Algérienne Démocratique et Populaire

Ministère de l'enseignement supérieur et de la recherche scientifique


Ecole Nationale Supérieur des Travaux Publics(ENSTP)

TP INFORMATIQUE N01

Réalisé par : Boutemeur wiam


Gr : 06

 Création de la base de donnée BDD01 avec la commande "Create database BDD01"


 Utilisation de la base avec la commande "Use BDD01".
 Création des tables (étudiant , club , inscription) avec la commande
"Create table [nom_table](liste des colonnes)"

Creation de la table Etudiant :

Affichage de la table etudiant :


la table Club :

Table Inscription :

Remplissage
Algèbre relationnel
les symboles utilisées (π=projection ; ∞ =jointure ; σ=sélection ; #=non égale
)

1) π nom,prenom (ETUDIANT)

2) π nom,prenom (ETUDIANT ∞ matricule=matricule_etud INSCRIPTION)

3) π nom,prenom (σnom=etudiant10(ETUDIANT))

4) on prend R1 = (ETUDIANT ∞ matricule=matricule_etud INSCRIPTION)

π (σ nom nom_club=scientifique (R1 ∞ code=code_club club))

5) π (σ nom nom_club=scientifique et nom_club#sportif (R1 ∞ code=code_club club))

6) π (σ nom nom_club=etudiants08 (ETUDIANT))

7) π (σnom date_insc<2010 (ETUDIANT



matricule=matricule_etud INSCRIPTION))

8) π nom_club (σdate_creation=2009 (club))


9) π nom_club (σdescription=ce club contient le plus grand nombre d'adherants (club))

1_ select nom_E , prenom_E

From Etudiant ;

2- select nom_E , prenom_E


From Etudiant
where matr_E in ( select matr_E from inscription where date_inscr = not
nul);
3- select nom_E ,prenom_E from Etudiant where matr_E in ( select matr_E
From inscription
Where date_inscr = nul ;
4- select nom_E
From Etudiant
where matr_E in ( select matr_E from inscription where code_c in ( select
code_c from club where nom_c = scientifique );
5- select nom_E
from Etudiant where matr_E in ( select matr_E from inscription
where code_c in ( select code_c from club where ( nom_c = scientifique
and nom_c #sportif );
6- select nom_E
from Etudiant
where matr_E in ( select matr_E from inscription where code_c in ( select
code_c from club where ( nom_c = scientifique,sportif,culturele);
7- select nom_E
From Etudiant
where matr_E in ( select matr_E from inscription where date_inscr
<2010 );

Vous aimerez peut-être aussi