INF1250 TP2

1060 mots 5 pages
Creation de la base de données
Create database jegere ;
Résultat : Query OK, 1 row affected (0,00 sec)

Utilisation de la base jegere
Use jegere

Création de la table Client
Create table if not exists jegere.Client ( idClient INT Not null,
NomClient VARCHAR(45) NOT NULL,
Adresse VARCHAR(45) NOT NULL,
Telephone VARCHAR(45) NOT NULL,
AdresseCourriel VARCHAR(45) NOT NULL,
NomPays VARCHAR(7) NOT NULL,
Primary Key (idClient));

Résultat: Query OK, 0 rows affected (0.02 sec)

Création de la table Étape
Create table if not exists jegere.etape ( idEtape INT NOT NULL,
NomEtape VARCHAR(45) NOT NULL,
Livrable VARCHAR(45) NOT NULL,
Primary Key (idEtape));

Résultat: Query OK, 0 rows affected (0.00 sec)

Création de la table Employé
CREATE TABLE IF NOT EXISTS jegere.Employe( idEmploye INT NOT NULL, nomEmploye VARCHAR(45) NOT NULL, adresse VARCHAR(45) NOT NULL, telephone VARCHAR(45) NOT NULL, adresseCourriel VARCHAR(45) NOT NULL,
PRIMARY KEY (idEmploye));

Résultat: Query OK, 0 rows affected (0.42 sec)

Création de la table Projet
Create table if not exists jegere.projet ( idProjet INT NOT NULL, idClient INT NOT NULL,
NomProjet VARCHAR(45) NOT NULL, dateDebut DATE NOT NULL,
DateFin DATE, idResponsable INT NOT NULL,
Primary Key (idProjet),
Foreign Key (idResponsable) references jegere.employe (idEmploye),
Foreign key (idClient) references jegere.Client (idClient),
Check (idProjet between 0 and 4000));

Résultat: Query OK, 0 rows affected (0.43 sec)

Création de la table RessourcesProjet
CREATE TABLE IF NOT EXISTS jegere.RessourcesProjet( idProjet INT NOT NULL, idEmploye INT NOT NULL, nbrHeures INT NOT NULL, prixHeures FLOAT NOT NULL,
FOREIGN KEY (idProjet) REFERENCES jegere.Projet (idProjet),
FOREIGN KEY(idEmploye) REFERENCES jegere.Employe (idEmploye));

Résultat: Query OK, 0 Rows affected (0.01 sec)

Création de la table EtapexProjet

Create table if not exists jegere.EtapexProjet ( idEtape INT NOT NULL, idProjet INT NOT NULL,
DateDebut DATE NOT NULL,

en relation

  • TD 2A004
    10895 mots | 44 pages
  • TP1-INF1250
    406 mots | 2 pages
  • Cas pesetout
    291 mots | 2 pages
  • TP1_INF 1250
    452 mots | 2 pages
  • Fin3500 tp2
    1809 mots | 8 pages
  • inf1250 -tp2
    1393 mots | 6 pages
  • Tp2 fin3500
    1404 mots | 6 pages
  • TP2 DSR5100
    5617 mots | 23 pages
  • TP1 INF1015
    733 mots | 3 pages
  • Hémisphere sud
    386 mots | 2 pages
  • ADM1002 TN2
    399 mots | 2 pages
  • Tp dsa3530
    2916 mots | 12 pages
  • ADM1013 TN2
    3145 mots | 13 pages
  • TP2
    358 mots | 2 pages
  • TD1 SQL cor
    753 mots | 4 pages