## [Database Schema Diagrams in Confluence with Mermaid ER (Copy-Paste)](/blog/mermaid-er-diagram-database-schema-confluence.md)

September 24, 2026 ·

<!-- -->

5 min read

[NGPilot](https://ngpilot.com)

The bug report says "orders show twice in the report" and the fix takes three days because nobody on the team is sure whether `order_lines` links to `orders` on `order_id` or `source_order_id`, and both columns exist. The schema is documented — in a `schema.md` that lists columns as bullets and a diagram that was last exported when the DB was two migrations younger. The join question is exactly the thing an ER diagram answers at a glance, and the thing a bulleted column list cannot answer at all.

**Quick answer:** document the database schema in Confluence as a Mermaid `erDiagram`, rendered by [Mermaid Plus for Confluence](https://marketplace.atlassian.com/apps/1236814/mermaid-plus-diagrams-for-confluence/). Entities hold keys and attributes; relationship lines carry the cardinality and the join's noun. When the discussion turns to the domain model the code exposes, add a `classDiagram` on the same page. This post gives you three copy-paste examples.

**Tags:**

* [confluence](/blog/tags/confluence.md)
* [mermaid](/blog/tags/mermaid.md)
* [er-diagram](/blog/tags/er-diagram.md)
* [database](/blog/tags/database.md)
* [schema](/blog/tags/schema.md)
* [class-diagram](/blog/tags/class-diagram.md)
* [how-to](/blog/tags/how-to.md)

[**Read more**](/blog/mermaid-er-diagram-database-schema-confluence.md)
