Files
sql/README.md

28 lines
615 B
Markdown
Raw Normal View History

2025-08-28 10:38:03 +02:00
### Construire l'image
2025-08-26 07:55:29 +02:00
2025-08-28 10:38:03 +02:00
```shell
docker build -t iut/pgsql:2025-08 .
2025-08-26 07:55:29 +02:00
```
2025-08-28 10:38:03 +02:00
## Données
2025-08-26 07:55:29 +02:00
2025-09-01 07:56:13 +02:00
### Conventions de nommage
Le nom des tables est au singulier et en minuscule
2025-08-28 10:38:03 +02:00
### Schéma
2025-08-26 07:55:29 +02:00
2025-09-01 07:56:13 +02:00
table |colonnes
--- |---
adherent | id, nom, prenom, genre, naissance, codepostal
famille | code, famille, code_parent
article | code, article, famille_code, factpoids, prix
ticket | id, date_ticket, adherent_id, mode_rglt
ligne | id, ticket_id, article_code, prix_unitaire, quantite
2025-08-29 22:12:55 +02:00
### Export
```shell
psql -h 127.0.0.1 -d sql -U sql -c "\copy (select * from ligne order by id) to './ligne.csv' with csv header"
```