Commit 516b3851204f055e91aa2833dccd7b727e554637
1 parent
7c73e919
Re: Fichier base de données
Showing
1 changed file
with
6 additions
and
9 deletions
Show diff stats
BDD.sql
... | ... | @@ -2,15 +2,12 @@ CREATE TABLE Utilisateur ( |
2 | 2 | loglille1 char(30), |
3 | 3 | login char(30) PRIMARY KEY, |
4 | 4 | mdp char(30), |
5 | - droit integer CHECK(droit >= 0 AND droit<=3) | |
5 | + droit integer DEFAULT 0 | |
6 | 6 | ); |
7 | 7 | |
8 | - | |
9 | 8 | CREATE TABLE Client ( |
10 | - nom char(30), | |
11 | - prenom char(30), | |
12 | 9 | loglille1 char(30) PRIMARY KEY, |
13 | - solde float 5.2, | |
10 | + solde float(5.2), | |
14 | 11 | idcarte integer, |
15 | 12 | credit boolean |
16 | 13 | ); |
... | ... | @@ -18,16 +15,16 @@ CREATE TABLE Client ( |
18 | 15 | |
19 | 16 | CREATE TABLE Prix ( |
20 | 17 | produit char(30), |
21 | - prix float 5.2 | |
18 | + prix float(5.2) | |
22 | 19 | ); |
23 | 20 | |
24 | 21 | |
25 | 22 | CREATE TABLE Transactions ( |
26 | 23 | id serial PRIMARY KEY, |
27 | 24 | type char(15), |
28 | - date_heure char(15), | |
29 | - montant float 5.2, | |
30 | - quantite interger 2, | |
25 | + date datetime, | |
26 | + montant float(5.2), | |
27 | + quantite integer(2), | |
31 | 28 | utilisateur char(30) REFERENCES Utilisateur(login), |
32 | 29 | client char(30) REFERENCES Client(loglille1), |
33 | 30 | valide boolean | ... | ... |