FlowDiagram
Database & ER modelsMermaid

Library management ER diagram template

Books, authors, copies, members, loans, holds and fines as a Mermaid ER diagram. This data model has 10 tables and 32 columns, joined by 10 relationships. FlowDiagram draws it as an entity-relationship diagram with crow's-foot notation.

Open in the editor →
  • Free — no account, no trial, no watermark
  • Fully editable shapes and connectors, not a screenshot
  • Export PNG, SVG or PDF, or share it as a link
  • Private: the diagram never leaves your browser

Tables in this data model

  • AUTHOR — 2 columns
  • BOOK — 5 columns
  • BOOK_AUTHOR — 2 columns
  • PUBLISHER — 2 columns
  • BRANCH — 2 columns
  • COPY — 4 columns
  • MEMBER — 3 columns
  • LOAN — 5 columns
  • HOLD — 4 columns
  • FINE — 3 columns

How to use this ER diagram template

  1. Click Open in the editor. The ER diagram opens on a new page in FlowDiagram — nothing is uploaded and there is no sign-up.
  2. Rename, add or delete shapes and drag them where you want; connectors stay attached as things move.
  3. Drop in vendor logos from the library — 1,160 of them, including every AWS, Azure and Google Cloud service icon — or restyle it with the colour and theme controls.
  4. Prefer text? Edit the Mermaid source below and paste it in through ☰ → Import diagram (see the Mermaid editor); it imports as an editable diagram.
  5. Export to PNG, SVG or PDF, or press Ctrl+L for a link that carries the whole diagram.

Mermaid source

The whole template is the text below. Paste it into FlowDiagram, keep it in Git next to the code it describes, or hand it to an AI assistant to extend.

erDiagram
  AUTHOR ||--o{ BOOK_AUTHOR : writes
  BOOK ||--o{ BOOK_AUTHOR : "written by"
  PUBLISHER ||--o{ BOOK : publishes
  BOOK ||--o{ COPY : "has copies"
  BRANCH ||--o{ COPY : holds
  MEMBER ||--o{ LOAN : borrows
  COPY ||--o{ LOAN : "lent in"
  MEMBER ||--o{ HOLD : places
  BOOK ||--o{ HOLD : "held for"
  LOAN ||--o| FINE : "may incur"
  AUTHOR {
    int author_id PK
    string name
  }
  BOOK {
    int book_id PK
    int publisher_id FK
    string isbn
    string title
    int year
  }
  BOOK_AUTHOR {
    int book_id FK
    int author_id FK
  }
  PUBLISHER {
    int publisher_id PK
    string name
  }
  BRANCH {
    int branch_id PK
    string name
  }
  COPY {
    int copy_id PK
    int book_id FK
    int branch_id FK
    string barcode
  }
  MEMBER {
    int member_id PK
    string name
    date expires_on
  }
  LOAN {
    int loan_id PK
    int copy_id FK
    int member_id FK
    date due_on
    date returned_on
  }
  HOLD {
    int hold_id PK
    int book_id FK
    int member_id FK
    date placed_on
  }
  FINE {
    int fine_id PK
    int loan_id FK
    decimal amount
  }

Related: Database schema diagram tool · Mermaid editor · All database & er models templates · All 521 templates