48 lines
1.2 KiB
Markdown
48 lines
1.2 KiB
Markdown
### Construire l'image
|
||
|
||
```shell
|
||
docker build -t iut/pgsql:2025-12 .
|
||
```
|
||
|
||
## Données
|
||
|
||
### Conventions de nommage
|
||
|
||
Le nom des tables est au singulier et en minuscule
|
||
|
||
### Schéma
|
||
|
||
table |colonnes
|
||
--- |---
|
||
adherent | id, nom, prenom, genre, naissance, codepostal
|
||
famille | code, famille, code_parent, arborescence (ltree), gauche, droite
|
||
article | code, article, famille_code, factpoids, prix
|
||
ticket | id, date_ticket, adherent_id, mode_rglt
|
||
ligne | id, ticket_id, article_code, prix_unitaire, quantite
|
||
|
||
### 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"
|
||
psql -h 127.0.0.1 -d sql -U sql -c "\copy (select id, source, target, cost, reverse_cost, ST_AsText(geom) from route order by id) to './route.csv' with csv header"
|
||
|
||
```
|
||
|
||
### Jeux de données
|
||
|
||
- https://www.kaggle.com/datasets/alexandrelemercier/food-detailed-nutritional-content
|
||
|
||
|
||
### Proxy
|
||
|
||
### Administration
|
||
|
||
pgAdmin est un outil d’administration et de gestion pour PostgreSQL.
|
||
C’est l’équivalent d’un « phpMyAdmin » pour MySQL, mais conçu pour PostgreSQL.
|
||
|
||
### PostGraphile
|
||
|
||
```shell
|
||
docker build -t iut/postgraphile:2025-12 ./postgraphile
|
||
```
|