A data flow diagram (DFD) is a diagram that shows how data moves through a system: where it comes from, which processes change it, where it is stored and where it goes. It describes the movement of information, not the order of steps or the timing, which makes it useful for understanding a system before deciding how to build or change it.
Data flow diagram symbols
A DFD uses four symbols:
External entity: a person, organization or system outside the one being described, which sends or receives data. Drawn as a rectangle.
Process: an activity that changes incoming data into outgoing data, such as "Validate order". Drawn as a circle or rounded rectangle.
Data store: a place where data rests, such as a database or a file. Drawn as an open ended rectangle or two parallel lines.
Data flow: a labeled arrow that shows data moving between the other three.
The two common notations, Yourdon and DeMarco and Gane and Sarson, differ only in the shapes they use.
Levels of a data flow diagram
Context diagram (level 0): the whole system as one process, with the external entities around it.
Level 1: the single process is broken into its main sub processes and data stores.
Level 2 and below: each level 1 process is expanded again where more detail is needed.
Every data flow entering or leaving a process must also appear on the diagram that expands it. This rule is called balancing.
When to use a data flow diagram
Use a DFD to analyze an existing system, define the scope of a new one, document how personal data is handled for a privacy or security review, or explain an information process to stakeholders who do not need the technical detail.
Example
A library draws a context diagram for its lending system. Members send loan requests and receive due dates. The level 1 diagram splits the system into "Check membership", "Record loan" and "Send reminders", with data stores for Members, Books and Loans.
Data flow diagram vs flowchart
A flowchart shows the sequence of steps and decisions. A DFD has no decisions or loops and shows only what data moves where. To describe the structure of the stored data, use an ER diagram. To show who performs each step, use a swimlane diagram. For a longer guide with rules and examples, read What is a data flow diagram.
Data flow diagrams in MockFlow
The AI data flow diagram generator turns a description of a system into a DFD on a MockFlow board that your team can edit together. Ready made starting points include the level 0 and level 1 data flow diagram templates. See also the whiteboard for developers.
