Drawing a Context Diagram
A complete example from scenario to finished diagram
The Scenario
A local library needs a system to manage book loans. Members borrow and return books. The librarian adds new books and members to the system. The system sends overdue notices to members and generates reports for the library manager.
1 Identify the System
What is the main system being described?
Library Loan Management System
This will be the single circle in the centre of our diagram.
2 Identify External Entities
Who or what interacts with the system from outside?
Tip: Look for people, organisations, or other systems that send data to OR receive data from the system.
| External Entity | Why? |
|---|---|
| Member | Borrows/returns books, receives overdue notices |
| Librarian | Adds books and members to the system |
| Library Manager | Receives reports from the system |
3 Identify Data Flows
What data moves between external entities and the system?
Member ↔ System
- → Into system: Loan request, Book return
- ← From system: Overdue notice, Loan confirmation
Librarian ↔ System
- → Into system: New book details, New member details
- ← From system: Confirmation
Library Manager ↔ System
- → Into system: Report request
- ← From system: Reports
Yourdon/DeMarco Notation
Circle = Process
The system itself
Rectangle = External Entity
People/systems outside
Arrow = Data Flow
Direction of data movement
The Finished Context Diagram
Key Points to Remember
- ✓ ONE process only - The entire system is shown as a single circle
- ✓ Label all arrows - Every data flow must have a descriptive name
- ✓ Show direction - Arrows show which way data flows
- ✓ No data stores - These only appear in Level 0 and lower DFDs
- ✓ External entities are OUTSIDE the system - They interact with but aren't part of it
Common Mistakes to Avoid
- ✗ Drawing multiple processes (save those for Level 0 DFD)
- ✗ Including data stores (databases) in context diagrams
- ✗ Unlabelled arrows - every flow needs a name
- ✗ Data flows between external entities (data must go through the system)