Ajustements base de données
This commit is contained in:
14
README.md
14
README.md
@@ -8,12 +8,8 @@ docker build -t iut/pgsql:2025-08 .
|
|||||||
|
|
||||||
### Schéma
|
### Schéma
|
||||||
|
|
||||||
Adherent : id_client, nom, ville
|
Adherent : id, nom, prenom, genre, naissance, codepostal
|
||||||
|
Famille : code, famille, code_parent
|
||||||
Famille : id_famille, nom_famille
|
Article : code, article, famille_code, factpoids, prix
|
||||||
|
Ticket : id, date_ticket, adherent_id, mode_rglt
|
||||||
Produit : id_produit, nom_produit, prix_unitaire, id_famille
|
Ligne : id, ticket_id, article_code, prix_unitaire, quantite
|
||||||
|
|
||||||
Ticket : id_ticket, date_vente, id_client
|
|
||||||
|
|
||||||
Ligne : id_ligne, id_ticket, id_produit, quantite, prix_unitaire
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ create table famille (
|
|||||||
create table article (
|
create table article (
|
||||||
code text primary key,
|
code text primary key,
|
||||||
article text,
|
article text,
|
||||||
famille text, -- references famille(famille)
|
famille_code text, -- references famille(famille)
|
||||||
factpoids int,
|
factpoids int,
|
||||||
unitevente int,
|
unitevente int,
|
||||||
prix decimal,
|
prix decimal,
|
||||||
@@ -29,14 +29,14 @@ create table article (
|
|||||||
create table ticket (
|
create table ticket (
|
||||||
id int primary key,
|
id int primary key,
|
||||||
date_ticket timestamp,
|
date_ticket timestamp,
|
||||||
client_id int,
|
adherent_id int,
|
||||||
mode_rglt int
|
mode_rglt int
|
||||||
);
|
);
|
||||||
|
|
||||||
create table ligne (
|
create table ligne (
|
||||||
id int primary key,
|
id int primary key,
|
||||||
ticket_id int, --references ticket (id),
|
ticket_id int, --references ticket (id),
|
||||||
article text, -- references article (code)
|
article_code text, -- references article (code)
|
||||||
prix_unitaire decimal,
|
prix_unitaire decimal,
|
||||||
quantite decimal
|
quantite decimal
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user