Blame

32da77 lisa 2026-04-27 19:40:38
Add C02 Context Diagram wiki page Anchored to C022-Lesson-Context-Diagram.md. Embeds Mark O'Meara (VCE) and Christopher Kalodikis (HSC) videos as Watch-first. Reuses Sales Order System worked example as ASCII art.
1
> **DRAFT** — under teacher review.
2
3
# Context Diagram
4
5
Hamilton College · Year 12 · 2026
6
7
A context diagram is the **highest-level** view of your software system: one shape for the whole system, the external entities it talks to, and the named data flows between them. Nothing inside, nothing extra. It is the diagram that defines the **scope** of what you are building — and it is the foundation every later diagram (Level-1 DFD, use case) must stay consistent with.
8
9
---
10
11
## Watch first (≈5 min total)
12
13
{{Video|src=https://www.youtube.com/watch?v=PKWCogQ8v7U}}
14
15
*Mark O'Meara (Geelong High School) — 1½-min VCE-targeted revision. Frames the context diagram as a **Level 0 DFD** using the Yourdon-DeMarco notation you'll use in C2-2. Watch for: one circle in the middle, entities outside, no internals.*
16
17
{{Video|src=https://www.youtube.com/watch?v=fWNrc6GNK14}}
18
19
*Christopher Kalodikis (Maximum Education, HSC) — 3-min overview building the intuition. Watch for: the **purpose** (showing inputs/outputs at a glance), why every external entity must have at least one labelled flow, and what counts as "external".*
20
21
---
22
23
## Why a context diagram
24
25
Think of it as a **satellite view** of your software. You can see the system's outline and everything crossing its boundary, but not what's happening inside.
26
27
It does four jobs:
28
29
- **Defines scope** — what's part of your system, and what isn't
30
- **Identifies stakeholders** — every external entity that interacts with the system
31
- **Visualises data exchanges** — every input and output, named
32
- **Anchors later diagrams** — your Level-1 DFD must show the same entities and flows
33
34
If you can't draw a clean context diagram for your project, you don't yet know what you're building.
35
36
---
37
38
## The three elements
39
40
| Element | Symbol | Rules |
41
|---|---|---|
42
| **The system** | One circle (Yourdon-DeMarco) | Exactly **one** — the whole system. Named after the system itself (e.g. *Sales Order System*, *Library Loans*). |
43
| **External entities** | Rectangles outside the circle | People, organisations, or other systems that interact with yours. Examples: *Customer*, *Administrator*, *Payment Gateway*, *Email Server*. |
44
| **Data flows** | Labelled arrows | Every arrow names the **specific data** crossing the boundary. Direction shows whether data goes in or out. |
45
46
What's **not** allowed on a context diagram:
47
48
- More than one process circle (that's a DFD — see [Context Diagram vs Data Flow Diagram](Context%20Diagram%20vs%20Data%20Flow%20Diagram.md))
49
- Data stores (no parallel-line rectangles at this level)
50
- Arrows between two entities (every flow must touch the system circle)
51
52
---
53
54
## Worked example: Sales Order System
55
56
```
57
┌───────────┐
58
│ Managers │
59
└─────┬─────┘
60
│ New Employee ▼ ▲ Employee Lists
61
│ │ Vendor & Product-vendors
62
│ │
63
▼ │
64
┌──────────────────────────────────┐
65
│ │
66
│ ( Sales Order System ) │
67
│ │
68
└──────────────────────────────────┘
69
▲ │ │ ▲
70
│ │ │ │ Order Invoices
71
Updates │ │ Customer │ │
72
Employee│ │ Order & │ │ Order &
73
Product │ │ Order-line │ │ Order-line
74
& Cat. │ ▼ │ │
75
┌──┴────────┐ ┌─────┴──┴─┐
76
│ Employees │ │ Customers │
77
└───────────┘ └───────────┘
78
```
79
80
**Read it like this:**
81
82
- **The system** (centre): *Sales Order System*
83
- **External entities**: *Managers*, *Employees*, *Customers* — all rectangles outside the circle
84
- **Data flows**:
85
- **Managers → System**: New Employee
86
- **System → Managers**: Employee Lists, Vendor and Product-vendor info
87
- **Employees → System**: Updates Employee, Product and Category
88
- **Customers → System**: Customer details, Order and Order-line
89
- **System → Customers**: Order Invoices
90
91
Notice what is **not** shown: how the system stores employees, how it validates an order, how it produces an invoice. Those are internal — they belong on the Level-1 DFD, not here.
92
93
---
94
95
## How to draw one
96
97
1. **Name the system.** What are you building? That name goes inside the single circle.
98
2. **List external entities.** Who or what interacts directly with the system? Include only **direct** interactions — if Entity A only talks to Entity B (and never to your system), A doesn't belong here.
99
3. **Name every data flow.** Walk through each entity in turn: what specific data does it send in? What does the system send back? Use specific labels (*"payment details"*, not *"information"*).
100
4. **Check completeness.** Every entity should have at least one arrow connecting it to the system. Every arrow should be labelled. No entity should connect directly to another entity.
101
102
---
103
104
## Most common mistakes
105
106
1. **Drift toward a DFD** — adding a second circle (e.g. "Verify User") inside the system. If there's more than one circle, it's no longer a context diagram.
107
2. **Unlabelled arrows** — *"data"* or *"info"* is not a label. Name the actual data.
108
3. **Entity-to-entity arrows** — every flow must touch the system. If two entities exchange data without your system involved, that exchange isn't on this diagram.
109
4. **Missing entities** — forgetting downstream systems (email server, payment gateway, reporting tool) that your system sends data to.
110
5. **Inventing detail** — showing data stores or internal logic. Save those for the Level-1 DFD.
111
112
---
113
114
## Self-check
115
116
Test yourself before moving on. Answers in your notes, not on the page.
117
118
1. Which of these is **not** a component of a context diagram?
119
*(a) process · (b) entity · (c) data flow · (d) data store*
120
121
2. In a context diagram, which statement is correct?
122
*(a) Entities can connect directly to other entities · (b) Data flows can only connect entities to the system process · (c) Multiple processes can be shown · (d) All flows must be unidirectional*
123
124
3. You're drawing a context diagram for a Library Management System. How should *"borrowing a book"* appear?
125
*(a) An entity labelled "Borrowing" · (b) A process inside the system · (c) A data flow labelled "Book borrowing request" from Borrower to the system · (d) A rectangle showing the book collection*
126
127
---
128
129
## See also
130
131
- [Context Diagram vs Data Flow Diagram](Context%20Diagram%20vs%20Data%20Flow%20Diagram.md) — when you move to Level 1, what changes and what stays the same
132
- [What Is an Entity](What%20Is%20an%20Entity.md) — entities aren't only people; non-human systems count
133
- [Excalidraw Diagram Starters](Excalidraw%20Diagram%20Starters.md) — pre-framed canvases for rehearsing all three diagrams under timed conditions