Jump to content

Research:Mermaid style ER diagram explained

From Costa Sano MediaWiki

Diagram symbols (legend)

The small symbols at the ends of lines indicate whether there is one or many items.

<mermaid> erDiagram

   ONE ||--|| ONE : "one-to-one"
   ONE ||--o{ MANY : "one-to-many"
   MANY }o--|| ONE : "many-to-one"
   MANY }o--o{ MANY : "many-to-many"

</mermaid>

Meaning in simple words:

  • || = exactly one
  • o{ or }o = many
  • Lines show how things are connected