1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| /*Liste des plats :*/
CREATE TABLE Alx_Plats
(idPlat INT(10) PRIMARY KEY,
nomPlat VARCHAR(100),
tpsPrep INT(3),
tpsCuis INT(3),
tpsRepos INT(5),
tpsTotal INT(5),
origine VARCHAR(50),
photo VARCHAR(1000));
/*Liste des ingrédients :*/
CREATE TABLE Alx_Ingredients
(idPlat INT(10),
idIngr INT(10),
nomIngr VARCHAR(100),
quantite DECIMAL(5,1),
unite VARCHAR(20),
PRIMARY KEY (idPlat, nomIngr),
FOREIGN KEY (idPlat) REFERENCES Alx_Plats(idPlat));
/*Prix des ingrédients :*/
CREATE TABLE Alx_Prix
(idIngr INT(10) PRIMARY KEY,
prixSupermarche DECIMAL(5,2),
prixBio DECIMAL(5,2),
prixMariacher DECIMAL(5,2),
FOREIGN KEY (idIngr) REFERENCES Alx_Ingredients(idIngr)); |
Partager