Commit 6cc0ced7 authored by Nu Huyen Trang Pham's avatar Nu Huyen Trang Pham
Browse files

Update create_table.sql

parent cbdb6825
......@@ -15,7 +15,7 @@ Create table Classe_animal (
);
Create table Veterinaire (
ID_personnel INT NOT NULL primary key,
ID_personnel INT NOT NULL PRIMARY KEY,
Nom varchar(30) NOT NULL,
prenom varchar(30) NOT NULL,
Date_de_naissance date NOT NULL,
......@@ -26,7 +26,7 @@ Create table Veterinaire (
);
Create table Assistant (
ID_personnel INT NOT NULL primary key,
ID_personnel INT NOT NULL PRIMARY KEY,
Nom varchar(30) NOT NULL,
prenom varchar(30) NOT NULL,
Date_de_naissance date NOT NULL,
......@@ -37,14 +37,14 @@ Create table Assistant (
);
Create table Espece (
ID_espece INT NOT NULL primary key,
ID_espece INT NOT NULL PRIMARY KEY,
Nom varchar(30) NOT NULL,
Classe INT,
foreign key(Classe) references Classe_animal(ID_classes)
);
Create table Animal (
ID_Animal INT NOT NULL primary key,
ID_Animal INT NOT NULL PRIMARY KEY,
Nom varchar(30) NOT NULL,
Poids FLOAT NOT NULL,
Taille FLOAT NOT NULL,
......@@ -58,14 +58,14 @@ Create table Animal (
);
Create table Effets_secondaires (
ID_effet_secondaire INT NOT NULL primary key,
ID_effet_secondaire INT NOT NULL PRIMARY KEY,
Effets varchar(100) NOT NULL
);
Create table Medicament (
ID_Medicament INT NOT NULL primary key,
ID_Medicament INT NOT NULL PRIMARY KEY,
Nom_de_molecule varchar(30) NOT NULL,
Description varchar(100) NOT NULL,
Description varchar(100) NOT NULL
);
Create table Medicament_Effet (
......@@ -79,19 +79,19 @@ Create table Med_correspond_Ani (
ID_Medicament INT,
foreign key(ID_Medicament) references Medicament(ID_Medicament),
ID_espece INT,
foreign key(ID_Espece) references Espece(ID_espece),
foreign key(ID_Espece) references Espece(ID_espece)
);
Create table Traitement (
ID_Traitement INT NOT NULL primary key,
Debut Time NOT NULL,
Duree Time NOT NULL,
ID_Traitement INT NOT NULL PRIMARY KEY,
Debut TIME NOT NULL,
Duree TIME NOT NULL,
Nom varchar(30) NOT NULL,
ID_Animal INT,
foreign key(ID_Animal) references Animal(ID_Animal),
Veterinaire INT,
foreign key(Veterinaire) references Veterinaire,
CHECK (Duree > 0)
CHECK (Duree <> '00:00:00')
);
Create table Traitement_Medicament (
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment