Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mermaid syntax for ER diagrams #118

Open
mbjones opened this issue Feb 16, 2022 · 0 comments
Open

mermaid syntax for ER diagrams #118

mbjones opened this issue Feb 16, 2022 · 0 comments

Comments

@mbjones
Copy link
Member

mbjones commented Feb 16, 2022

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
    }

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
    }

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant