Data Flow Diagram (DFD) Levels 0, 1 and 2 Explained
Almost every final-year project report asks for DFDs. They show how data moves through your system — not the order of steps, which is what confuses most students. Here is how the levels fit together, with one example carried through all three.
Final-year project · 2026-10-14 · 9 min read
What a DFD shows (and what it does not)
A data flow diagram shows where data comes from, what processes transform it, where it is stored and where it goes. Unlike a flowchart it has no decisions, no loops and no start or end — it is a map of data, not a sequence of steps.
The four DFD symbols
| Symbol | Yourdon / DeMarco | Gane & Sarson | Meaning |
|---|---|---|---|
| External entity | Rectangle | Rectangle (shaded) | A person or system outside yours that sends or receives data — Customer, Bank |
| Process | Circle (bubble) | Rounded rectangle | Something that transforms data — Place order |
| Data store | Two parallel lines | Open-ended rectangle | Data at rest — Orders, Menu |
| Data flow | Labelled arrow | Labelled arrow | Data moving — order details, payment status |
Level 0 — the context diagram
Level 0 shows the whole system as a single process and every external entity it talks to. For an online food ordering system: the Customer sends order details and payment; the Restaurant receives orders and sends status updates; the Delivery partner receives pickup details; the Payment gateway confirms payments. All of it goes into and out of one bubble: "0 Food Ordering System".
Tip: At level 0 there are no data stores. If you are drawing a database, you are already at level 1.
Level 1 — the main processes
Level 1 opens the single bubble into its main processes, numbered 1, 2, 3…, and adds the data stores between them:
- 1 Manage menu — the restaurant updates items in the D1 Menu store.
- 2 Place order — reads D1 Menu, writes D2 Orders.
- 3 Process payment — exchanges payment data with the Payment gateway, updates D2 Orders.
- 4 Assign delivery — reads D2 Orders, sends pickup details to the Delivery partner.
- 5 Track order — reads D2 Orders and sends status to the Customer.
Every external entity and data flow from level 0 must still appear at level 1. This is called balancing, and examiners check it.
Level 2 — one process in detail
Level 2 zooms into a single level 1 process. Exploding "3 Process payment" gives 3.1 Create payment request, 3.2 Send to gateway, 3.3 Verify response, 3.4 Update order status — with the same inputs and outputs as process 3 had at level 1. You usually only draw level 2 for the one or two most important processes.
Example: The food delivery system the DFDs describe, as an architecture diagram.
DFD rules
- Data cannot flow directly between two external entities, or between two data stores — it must pass through a process.
- Every process has at least one input and one output.
- Every data flow is labelled with the data it carries ("order details", not "send").
- Process names are verb phrases; data store names are plural nouns.
- Child diagrams balance with their parent.
DFD vs flowchart
| DFD | Flowchart | |
|---|---|---|
| Shows | Movement of data | Order of steps and logic |
| Decisions | No | Yes (diamonds) |
| Data stores | Yes | Rarely |
| Used for | System analysis | Algorithms and procedures |
AI Flowchart's Project Kit takes your project title and generates level 0 and level 1 DFDs together with the ER, use case, class, activity and sequence diagrams your report needs — each with an explanation and viva questions.
Frequently asked questions
What is a level 0 DFD?
The context diagram: the whole system drawn as one process, with all the external entities that send data to it or receive data from it. It has no data stores.
How many levels should a DFD have?
Most projects need level 0 and level 1. Draw level 2 only for complex processes that need more detail.
What is balancing in a DFD?
A child diagram must have the same inputs and outputs as the process it expands. Every flow in level 0 must appear in level 1.