Explorer, documenter et faire évoluer ses bases de données avec Azimutt
Loïc Knuchel
15 jan. 2025
@loicknuchel
Loïc Knuchel
@loicknuchel
@azimuttapp
Créateur de
Pourquoi Azimutt?
Mieux comprendre et travailler
avec les base de données
à l’échelle
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Comprendre une requête complexe
(SELECT p.id, 'Internal' AS kind, p.title, p.duration, p.description, p.tags, p.slides, p.video, null AS url
, json_agg(json_build_object('id', u.id, 'slug', u.slug)) AS speakers
, t.id AS talk_id, t.status AS talk_status
, c.id AS cfp_id, c.name AS cfp_name
, e.id AS event_id, e.kind AS event_kind, e.name AS event_name, e.start AS event_start
, g.id AS group_id, g.name AS group_name
, array_agg(r.grade) FILTER (WHERE r.grade IS NOT NULL) AS ratings
, count(co.id) AS nb_comments
FROM proposals p
CROSS JOIN LATERAL unnest(string_to_array(p.speakers, ',')) speaker_id
JOIN users u ON speaker_id = u.id
JOIN talks t ON p.talk_id = t.id
JOIN cfps c ON p.cfp_id = c.id
LEFT JOIN events e ON p.event_id = e.id
LEFT JOIN groups g ON c.group_id = g.id
LEFT JOIN proposal_ratings r ON p.id = r.proposal_id
LEFT JOIN comments co ON p.id = co.proposal_id
WHERE p.status = 'Accepted' AND '8a4ed953-1b25-4c18-8d48-7dd33d48bea1' = ANY (string_to_array(p.speakers, ','))
GROUP BY p.id, t.id, c.id, e.id, g.id)
UNION ALL
(SELECT p.id, 'External' AS kind, p.title, p.duration, p.description, p.tags, p.slides, p.video, p.url
, json_agg(json_build_object('id', u.id, 'slug', u.slug)) AS speakers
, t.id AS talk_id, t.status AS talk_status
, null AS cfp_id, null AS cfp_name
, e.id AS event_id, e.kind AS event_kind, e.name AS event_name, e.start AS event_start
, null AS group_id, null AS group_name
, null AS ratings
, 0 AS nb_comments
FROM external_proposals p
CROSS JOIN LATERAL unnest(string_to_array(p.speakers, ',')) speaker_id
JOIN users u ON speaker_id = u.id
JOIN talks t ON p.talk_id = t.id
JOIN external_events e ON p.event_id = e.id
WHERE p.status = 'Accepted' AND '8a4ed953-1b25-4c18-8d48-7dd33d48bea1' = ANY (string_to_array(p.speakers, ','))
GROUP BY p.id, t.id, e.id)
ORDER BY event_start DESC;
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
SELECT ...
FROM proposals
JOIN users ON ...
JOIN talks ON ...
JOIN cfps ON ...
JOIN events ON ...
JOIN groups ON ...
JOIN proposal_ratings ON ...
JOIN comments ON ...
UNION ALL
SELECT ...
FROM external_proposals
JOIN users ON ...
JOIN talks ON ...
JOIN external_events ON ...
Accès instantané
aux indexes
et contraintes
Contraintes et statistiques
de la colonnes
Explorer sa base de données
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Il manque quelques tables…
Documentation
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Explorer ses données
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Requêtes IA
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Base de données multiples
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Inventory
Source
Catalog
Source
Shopping
Source
Initial
layout
Buyer
layout
Provider
layout
Azimutt
model
Database design
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Analyse de base de données
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
27 règles métier, 30 de plus prévues, + l’ajout d’extension
Comment je me suis lancé sur Azimutt?
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
❤️
2020
Après 4 ans d’utilisation
Utilisé par des:
80 personnes par mois utilisent Azimutt
(20% de la tech)
Usages:
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Bien démarrer avec Azimutt
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Bientôt: Azimutt plateforme 🚀
Objectif: anticiper les incidents de production
Recherche
design partners
Loïc Knuchel - @loicknuchel @azimuttapp - https://azimutt.app
Merci ❤️