Commit 7b9c0dc6db9566f85bfd8e3b87ea5ccf5feca82c
1 parent
b382057c
Fichier de base de donnees (a verifier)
Showing
1 changed file
with
34 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,34 @@ | @@ -0,0 +1,34 @@ | ||
1 | +CREATE TABLE Utilisateur ( | ||
2 | + loglille1 char(30), | ||
3 | + login char(30) PRIMARY KEY, | ||
4 | + mdp char(30), | ||
5 | + droit integer CHECK(droit >= 0 AND droit<=3) | ||
6 | +); | ||
7 | + | ||
8 | + | ||
9 | +CREATE TABLE Client ( | ||
10 | + nom char(30), | ||
11 | + prenom char(30), | ||
12 | + loglille1 char(30) PRIMARY KEY, | ||
13 | + solde float5.2, | ||
14 | + idcarte integer, | ||
15 | + credit boolean | ||
16 | +); | ||
17 | + | ||
18 | + | ||
19 | +CREATE TABLE Prix ( | ||
20 | + produit char(30), | ||
21 | + prix float5.2 | ||
22 | +); | ||
23 | + | ||
24 | + | ||
25 | +CREATE TABLE Transactions ( | ||
26 | + id serial PRIMARY KEY, | ||
27 | + type char(15), | ||
28 | + date char(15), | ||
29 | + montant float5.2, | ||
30 | + quantite interger2, | ||
31 | + utilisateur char(30) REFERENCES Utilisateur(login), | ||
32 | + client char(30) REFERENCES Client(loglille1), | ||
33 | + valide boolean | ||
34 | +); |