Iâve been using a diagramming style for a few years now, that Iâd taken to calling âinstance diagramsâ, that look like this:
On a whim, I pasted one into Claude, and it turns out theyâre called Property Graph Diagrams, and are popular in the neo4j/graph database communities.
The basic idea is to focus on âthe rows in the databaseâ, although not at a raw âliterally every column & every rowâ sort of way, but more of an abbreviated âoverviewâ of each entity:
- Each box/node is a row/entity in the database
- Each node has its id, which since weâre using Joist đ is a tagged id
- The arrows are foreign keys, representing relationships between entities
- Only include the relationships/FKs weâre focused onâbeing exhaustive would actually hurt the readability of the diagram
- You can optionally color nodes by entity type
- You can optionally group nodes in boxes by whatever makes sense
The goal is to guide discussions & brainstorming through scenarios, i.e. for some specific scenario (or small set of scenarios), how do the ârows in the databaseâ (entities) relate to each other.
(Since weâre trying to be âabbreviatedâ, it might seem odd to include the row ids in each box, but I find it grounds the diagram as âyes these are physical database rowsâ, and with tagged ids also gives a succinct/implicit âtype hintâ to each node; and finally they work great for referencing in conversations: âOh you mean b:2 is published? Right!â.)
I find this style of diagramming really helps myself & others visualize the data & connections, and ground our conversations in a shared understanding of the data model, instead of each of us having slightly different understandings in our heads, as we just ramble on.
If written during the early/design doc phase of a project, and then kept up to date đ , they also form really amazing documentation, where the instance diagrams for particularly complicated features become (fortunately or unfortunately) common reading for devs working on that feature.