Templates / erDiagram

Blog / CMS data model

Authors, posts, comments, and a many-to-many tag relationship — the canonical content schema.

Open in studio

Preview

Mermaid 11 renderer

Rendering preview...

Mermaid source

erDiagram

erDiagram
    AUTHOR ||--o{ POST : writes
    POST ||--o{ COMMENT : receives
    POST }o--o{ TAG : "tagged with"
    AUTHOR {
        int id PK
        string display_name
        string email
    }
    POST {
        int id PK
        int author_id FK
        string title
        string slug
        datetime published_at
    }
    COMMENT {
        int id PK
        int post_id FK
        string author_name
        string body
    }
    TAG {
        int id PK
        string name
    }

More templates