Data Flow Diagram Level 0 and 1: Draw Both, Step by Step (Full Example)
A data flow diagram shows where data comes from, what changes it, where it is kept and where it goes. In this video I draw a data flow diagram level 0 and level 1 for a made-up online shop: the 4 symbols, the 5 rules, a 5-step method, and how following one piece of data found the shop's bug. Then I build the start of it in draw.io.
Step by step
A DFD shows data, not steps
- A data flow diagram (DFD) is not a flowchart. It has no order and no decisions. It shows where data comes from, which processes change it, where it is kept and where it goes. The example is a made-up online shop whose website keeps selling items that are sold out.
Explain like I'm 5: the water pipes
- Think of the water pipes in a house. The street is an external entity, the kettle is a process, the tank is a data store and the pipes are data flows. The drawing doesn't say who showers first. It only shows where the water goes.
Four elements and the levels (BABOK)
- The BABOK Guide describes 4 elements: external entities, processes, data stores and data flows. The context diagram, or level 0, shows the whole system as one process. Level 1 opens it into main processes, and level 2 opens one of those. Some books treat context and level 0 as separate.
Before you draw: three lists
- Make 3 lists first: the outsiders (customer, payment provider, supplier, courier), the data crossing the border (such as the payment result and shipping label), and what the system does, as a verb and noun (take order, update stock). Check them with the people who do the work.
The vague problem
- The sales manager says the website sells stock the shop doesn't have, and asks you to fix the system. That isn't a requirement yet. Nobody knows where the website's stock number comes from, and that is the question a DFD answers.
Symbols 1-2: entity and process
- An external entity is a plain box for someone or something outside the system, like the customer. A process is a circle, or bubble, in this style. It takes data in and sends data out. Name it with a verb and a noun, like take order, and number it at level 1.
Symbols 3-4: store and flow
- A data store is a box with one open side and a name like D1 orders. Data waits there until a process needs it. A data flow is an arrow labelled with the data it carries, a noun: order, not send order. The arrow from the stock store into take order carries the stock level.
Five rules that keep it honest
- Follow 5 rules. 1: every flow touches a process. 2: no flows between 2 outsiders. 3: every process has data in and data out. 4: every flow has a noun label. 5: level 1 has the same border flows as level 0.
Step 1: draw level 0 first
- Draw 1 bubble for the whole online shop, with the 4 outsiders around it. Add 6 border flows: order, order confirmation, payment request, payment result, shipping label and delivery note. This context diagram is your contract for level 1.
Step 2: processes and border flows
- Open up the bubble and keep the outsiders on the edges. Take order gets the order. Take payment handles the payment request, payment result and confirmation. Pack and ship sends the label. Update stock gets the delivery note. Keeping the same 6 border flows is called balancing.
Step 3: stores and inside flows
- Add D1 orders and D2 stock. Take order writes the new order to D1, passes the order total to take payment and reads the stock level from D2. Take payment writes the paid status to D1. Pack and ship reads the paid order. Update stock writes the new stock level to D2.
Step 4: check the rules, follow the data
- Check the rules, then follow one piece of data: the stock level. Update stock writes it and take order reads it. But the only data coming into update stock is the supplier's delivery note. Stock goes up when boxes arrive, and nothing brings it down when parcels leave.
Step 5: ask why, then fix the flow
- Ask the warehouse team how stock goes down. Sam types shipped items in by hand every Friday, so the website can be wrong for up to a week. The fix is 1 new flow: pack and ship sends items shipped to update stock each time a parcel leaves.
Worked example: the finished level 1
- Level 1 has 4 processes, 2 stores, 4 outsiders and 13 flows on one page. Take order (1) checks stock and saves the order. Take payment (2) marks it paid and confirms it. Pack and ship (3) sends the label and reports what left. Update stock (4) adds deliveries and removes what shipped.
Build it in draw.io
- In draw.io, click More Shapes, tick the data flow diagram shapes and click Apply. Drag a plain box for Customer, a bubble for 1.0 Take order and an open box for D1 orders. Hover over Customer and drag the blue arrow onto the bubble, then label it order.
Confirm it and write the fix
- Play both levels back to the warehouse team, finance and the sales manager. Then write requirements: stock drops for every item as soon as a parcel ships, and the website never offers more than the stock level. Mark supplier returns out of scope. Link the diagram from the Jira story.
5 common mistakes
- Watch for 5 mistakes: yes and no on arrows, verbs on arrows, a customer writing straight into a store, a process with no output or no input, and a level 1 that doesn't match level 0. If a new outsider appears, fix level 0 first.
Recap
- A DFD shows data, not steps, using 4 symbols. Level 0 shows the whole system as one bubble. Level 1 opens it into numbered processes with the same border flows. Add the stores, check the rules and follow one piece of data through to find gaps.
Common mistakes
- Drawing steps and decisions. If your arrows say yes and no, you have drawn a flowchart. Remove the order and decisions, and show only the data moving between processes, stores and outsiders.
- Verbs on the arrows. Send order is an action, but order is data. Label every arrow with a noun that names the data it carries.
- A customer writing straight into a data store. Every flow must touch a process, so put a process between them. In the example, take order sits between the customer and D1 orders.
- A level 1 that doesn't match level 0. Both levels must have the same border flows. If a new outsider or border flow shows up at level 1, go back and fix level 0 first.
When a business analyst uses this
When stakeholders report that a system figure is wrong, a business analyst can draw level 0 and level 1, then follow that figure through each process in a workshop. A missing flow becomes a question for the team and then a clear requirement for sign-off.
Questions people ask
What is the difference between data flow diagram levels 0, 1 and 2?
Level 0 shows the whole system as one process. Level 1 opens it into its main processes, and level 2 opens up one of those level 1 processes in more detail.
What is an example of a level 0 and level 1 data flow diagram for online shopping?
At level 0, one online shop bubble connects to the customer, payment provider, supplier and courier. At level 1, it opens into take order, take payment, pack and ship, and update stock, with orders and stock stores.
Is a level 0 data flow diagram the same as a context diagram?
Often, yes. The BABOK Guide treats them as the same, but some books keep them apart, so check which meaning a book or team is using.