From 7b9c0dc6db9566f85bfd8e3b87ea5ccf5feca82c Mon Sep 17 00:00:00 2001 From: Cyprien Bouissou Date: Tue, 5 Apr 2016 12:47:41 +0200 Subject: [PATCH] Fichier de base de donnees (a verifier) --- BDD.sql | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+), 0 deletions(-) create mode 100644 BDD.sql diff --git a/BDD.sql b/BDD.sql new file mode 100644 index 0000000..ddf0ae0 --- /dev/null +++ b/BDD.sql @@ -0,0 +1,34 @@ +CREATE TABLE Utilisateur ( + loglille1 char(30), + login char(30) PRIMARY KEY, + mdp char(30), + droit integer CHECK(droit >= 0 AND droit<=3) +); + + +CREATE TABLE Client ( + nom char(30), + prenom char(30), + loglille1 char(30) PRIMARY KEY, + solde float5.2, + idcarte integer, + credit boolean +); + + +CREATE TABLE Prix ( + produit char(30), + prix float5.2 +); + + +CREATE TABLE Transactions ( + id serial PRIMARY KEY, + type char(15), + date char(15), + montant float5.2, + quantite interger2, + utilisateur char(30) REFERENCES Utilisateur(login), + client char(30) REFERENCES Client(loglille1), + valide boolean +); -- libgit2 0.21.2