ER: Blog Platform Schema

Blog system with users, posts, comments, and tags.

er-blog-platform-schema.mmd
erDiagram
  USER {
    int id PK
    string username UK
    string email UK
    date joined
  }
  POST {
    int id PK
    string title
    text content
    int author_id FK
    date published
  }
  COMMENT {
    int id PK
    text body
    int post_id FK
    int user_id FK
    date created
  }
  TAG {
    int id PK
    string name UK
  }
  USER ||--o{ POST : writes
  USER ||--o{ COMMENT : authors
  POST ||--o{ COMMENT : has
  POST }|--o{ TAG : tagged-with
Output
ER diagram, Zombie Mermaid USER PK int id UK string username UK string email date joined POST PK int id string title text content FK int author_id date published COMMENT PK int id text body FK int post_id FK int user_id date created TAG PK int id UK string name writes authors has tagged-with

More ER diagram examples