Skip to content

mermaid syntax for ER diagrams #118

@mbjones

Description

@mbjones

Consider using Mermaid for ER diagrams and other technical drawings in the lessons.

Here's an example ER diagram from the data modeling lesson:

  erDiagram
    Site ||--o{ SpeciesObservation : contains
    Site {
        int site
        string name
        float temp
    }
    SpeciesObservation {
        int id
        string date
        int site
        string spcode
        string height
    }
Loading

The syntax should also allow specification of primary and foreign keys, but when used, I see GitHub rendering issues, so this needs to be explored further. For example:

  erDiagram
    Site ||--o{ SpeciesObservation : contains
    Site {
        int site PK
        string name
        float temp
    }
    SpeciesObservation {
        int id PK
        string date
        int site FK
        string spcode
        string height
    }
Loading

I think the cause for this issue has been identified upstream in mermaid issue mermaid-js/mermaid#2548.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions