Notes2 et exos
This commit is contained in:
parent
3cd33323b2
commit
21d129ba49
BIN
Code/TD1.db
Normal file
BIN
Code/TD1.db
Normal file
Binary file not shown.
BIN
Code/TD1.db-journal
Normal file
BIN
Code/TD1.db-journal
Normal file
Binary file not shown.
33
Code/TD1.sql
Normal file
33
Code/TD1.sql
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
BEGIN TRANSACTION;
|
||||||
|
CREATE TABLE IF NOT EXISTS "Personne" (
|
||||||
|
"NumPersonne" INTEGER,
|
||||||
|
"NomPersonne" VARCHAR(50),
|
||||||
|
PRIMARY KEY("NumPersonne")
|
||||||
|
);
|
||||||
|
CREATE TABLE IF NOT EXISTS "Fournisseur" (
|
||||||
|
"numF" INTEGER,
|
||||||
|
"nomF" VARCHAR(20),
|
||||||
|
"CatF" INTEGER,
|
||||||
|
"VilF" VARCHAR(15),
|
||||||
|
PRIMARY KEY("numF")
|
||||||
|
);
|
||||||
|
CREATE TABLE IF NOT EXISTS "Piece" (
|
||||||
|
"numP" INTEGER,
|
||||||
|
"nomP" VARCHAR(20),
|
||||||
|
"clrP" VARCHER(20),
|
||||||
|
"PdsP" INTEGER,
|
||||||
|
PRIMARY KEY("numP")
|
||||||
|
);
|
||||||
|
CREATE TABLE IF NOT EXISTS "Livraison" (
|
||||||
|
"numF" INTEGER,
|
||||||
|
"numP" INTEGER,
|
||||||
|
"Qte" INTEGER,
|
||||||
|
PRIMARY KEY("numF","numP"),
|
||||||
|
FOREIGN KEY("numP") REFERENCES "Piece",
|
||||||
|
FOREIGN KEY("numF") REFERENCES "Fournisseur"
|
||||||
|
);
|
||||||
|
INSERT INTO "Personne" VALUES (1,'Martin');
|
||||||
|
INSERT INTO "Fournisseur" VALUES (32,'Thales',2,'Paris');
|
||||||
|
INSERT INTO "Piece" VALUES (25,'engrenage','gris',300);
|
||||||
|
INSERT INTO "Livraison" VALUES (32,25,40);
|
||||||
|
COMMIT;
|
BIN
Notes-de-Cours/Notes2.pdf
Normal file
BIN
Notes-de-Cours/Notes2.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user