Arbre

2025-09-08 07:50:40 +02:00
parent 25556ef7ca
commit d2a96d0b8a
3 changed files with 11 additions and 3 deletions

@@ -38,7 +38,15 @@ CREATE TABLE familles (
### ###
## Nested Sets (modèle densembles imbriqués) ## Nested Sets (modèle densembles imbriqués)
Représentation intervallaire
## Materialized Path (chemin matérialisé) ## Materialized Path (chemin matérialisé)
## Représentation intervallaire Trouver tous les articles descendants dune catégorie
```sql
SELECT a.name
FROM articles a
JOIN categories c ON a.category_id = c.id
WHERE c.path <@ 'Legumes.Racine';
```

@@ -14,7 +14,7 @@
<line x1="30" y1="330" x2="30" y2="13" stroke="#000" marker-end="url(#arrow)" /> <line x1="30" y1="330" x2="30" y2="13" stroke="#000" marker-end="url(#arrow)" />
<line x1="10" y1="312.5" x2="330" y2="312" stroke="#000" marker-end="url(#arrow)" /> <line x1="10" y1="312.5" x2="330" y2="312" stroke="#000" marker-end="url(#arrow)" />
<path stroke="#000" d="M55 317.5v-10M80 317.5v-10M105 317.5v-10M130 317.5v-10M155 317.5v-10M180 317.5v-10M205 317.5v-10M230 317.5v-10M255 317.5v-10M280 317.5v-10M305 317.5v-10M25 287.5h10M25 262.5h10M25 237.5h10M25 212.5h10M25 187.5h10M25 162.5h10M25 137.5h10M25 112.5h10M25 87.5h10M25 62.5h10M25 37.5h10"/> <path stroke="#000" d="M55 317.5v-10M80 317.5v-10M105 317.5v-10M130 317.5v-10M155 317.5v-10M180 317.5v-10M205 317.5v-10M230 317.5v-10M255 317.5v-10M280 317.5v-10M305 317.5v-10M25 287.5h10M25 262.5h10M25 237.5h10M25 212.5h10M25 187.5h10M25 162.5h10M25 137.5h10M25 112.5h10M25 87.5h10M25 62.5h10M25 37.5h10"/>
<text x="15" y="265">b</text> <text x="12" y="265">b</text>
<g fill="#008"> <g fill="#008">
<ellipse rx="4" ry="4" cx="205" cy="186.5" /> <ellipse rx="4" ry="4" cx="205" cy="186.5" />
<ellipse rx="4" ry="4" cx="155" cy="213.75" /> <ellipse rx="4" ry="4" cx="155" cy="213.75" />

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB