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
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
| Shape | Symbol | Connections |
|---|---|---|
| Librarian | Actor | → Loan system(Scan card and book) · ← Loan system |
| Loan system | Participant 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 DB | Participant and lifeline | → Loan system(No overdue) · ← Loan system |
| Book DB | Participant and lifeline | → Loan system(Available) · ← Loan system, Loan system |
Symbols used here
| Symbol | Meaning |
|---|---|
| Participant and lifeline | A box on top and a dashed line below. |
| Actor | A human participant; a stick figure. |
| Synchronous message | A call that waits; solid line, filled head. |
| Reply | The answer; dashed line, open head. |
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