Diagram Desk

Library loan sequence diagram

Librarian, loan system, member and book databases at the desk. Seen with the flowchart, use case and ER examples, one system from four angles.

The diagram

Loan systemMember DBBook DBScan card and bookMember statusNo overdueBook statusAvailableMark as on loanDue dateLibrarian
Sequence diagram · 4 shapes

Reading it step by step

  • 1. 'Librarian' sends a request to 'Loan system': 'Scan card and book'.
  • 2. 'Loan system' sends a request to 'Member DB': 'Member status'.
  • 3. 'Member DB' replies to 'Loan system': 'No overdue'.
  • 4. 'Loan system' sends a request to 'Book DB': 'Book status'.
  • 5. 'Book DB' replies to 'Loan system': 'Available'.
  • 6. 'Loan system' sends a request to 'Book DB': 'Mark as on loan'.
  • 7. 'Loan system' replies to 'Librarian': 'Due date'.

Shape by shape

ShapeSymbolConnections
LibrarianActor→ Loan system(Scan card and book) · ← Loan system
Loan systemParticipant and lifeline→ Member DB(Member status), Book DB(Book status), Book DB(Mark as on loan), Librarian(Due date) · ← Librarian, Member DB, Book DB
Member DBParticipant and lifeline→ Loan system(No overdue) · ← Loan system
Book DBParticipant and lifeline→ Loan system(Available) · ← Loan system, Loan system

Symbols used here

SymbolMeaning
Participant and lifelineA box on top and a dashed line below.
ActorA human participant; a stick figure.
Synchronous messageA call that waits; solid line, filled head.
ReplyThe answer; dashed line, open head.

All sequence diagram symbols and how to draw

Diagram text

Paste this text into the editor to get the same picture, then change the names to fit your own work.

# Library loan sequence diagram
sequenceDiagram
  actor L as Librarian
  participant S as Loan system
  participant M as Member DB
  participant K as Book DB
  L->>S: Scan card and book
  S->>M: Member status
  M-->>S: No overdue
  S->>K: Book status
  K-->>S: Available
  S->>K: Mark as on loan
  S-->>L: Due date

More sequence diagram examples

All SeewolLabs tools