Solutions
Solutions Exercice 1 :
CREATE TABLE Employes (
id_employe INT AUTO_INCREMENT PRIMARY KEY,
nom VARCHAR(100)
);
CREATE TABLE Projets (
id_projet INT AUTO_INCREMENT PRIMARY KEY,
nom_projet VARCHAR(100),
id_employe INT,
FOREIGN KEY (id_employe) REFERENCES Employes(id_employe)
);
Solution Exercice 2 :
CREATE TABLE Medecins (
id_medecin INT AUTO_INCREMENT PRIMARY KEY,
nom VARCHAR(100)
);
CREATE TABLE Patients (
id_patient INT AUTO_INCREMENT PRIMARY KEY,
nom VARCHAR(100)
);
CREATE TABLE Medecin_Patient (
id_medecin INT,
id_patient INT,
FOREIGN KEY (id_medecin) REFERENCES Medecins(id_medecin),
FOREIGN KEY (id_patient) REFERENCES Patients(id_patient)
);
Last updated