Context Diagrams (Yourdon/DeMarco)
What is a Context Diagram?
A context diagram is the highest-level data flow diagram for a system. It shows the whole system as one process and shows the data that crosses the system boundary between the system and external entities.
For this course, draw context diagrams using Yourdon/DeMarco notation: one process circle, external entity rectangles, and labelled data-flow arrows.
Yourdon/DeMarco Notation
External entity
A person, organisation, department or other system outside the system boundary.
Process 0
The whole system, shown once only. Do not split it into internal sub-processes on a context diagram.
Data flow
A labelled arrow showing data moving into or out of the system. Use data names, not vague actions.
Correct Worked Example
Scenario: a school uses a study room booking system. Students request bookings, staff maintain room availability, and the facilities manager receives usage summaries and sends room closure notices.
Study Room Booking System Context Diagram
How to Build One From a Scenario
- Name the system. Put the system name inside one process circle and number it 0.
- Set the boundary. Anything outside the system that sends or receives data becomes an external entity.
- List the data flows. Use short noun phrases such as booking request, payment details or report summary.
- Draw arrows only between the system and external entities. If two external entities communicate with each other, that is outside this diagram.
- Check balance. The diagram should match the scenario: no missing entity, no extra internal process, no unlabelled arrow.
Common Mistakes
- Using multiple processes (should be ONE only)
- Showing a database, file or data store inside the context diagram
- Drawing data flows directly between two external entities
- Forgetting to label data flows
- Data flows without clear direction arrows
- Using action labels such as book room instead of data labels such as booking request
Quick Self-Check
Before you submit a context diagram, ask:
- Does it have exactly one process circle?
- Is the process labelled with the system name and numbered 0?
- Are all external entities rectangles outside the system?
- Does every data flow have a clear direction and a data label?
- Have I avoided data stores and internal processes?