What is a data flow diagram (DFD)?

A data flow diagram (DFD) is the flow of a system or a procedure in terms of inputs and outputs. It also represents the requirement of the system and shows how the current system is implemented. Many system analysts use it to communicate with a user.

A DFD is used in several ways discussed below:

  • Software engineering: A DFD provides the flow before starting to code.

  • Manufactures: This allows them to visualize requirements as they build on existing work.

  • Business analysis: This helps identify business needs, visualize the needs, and remove the inefficiencies.

The components of a DFD

A data flow diagram has four essential elements. These are as follows:

  • External entities

  • Data stores

  • Processes

  • Data flow

We represent them by the two main methods of notation used in DFDs—Yourdon & Coad and Gane & Sarson.

The components of a DFD

Levels of DFD

A DFD also has levels that help us organize and categorize the data. Starting with Level 0, which is the most basic, a DFD increases in terms of complexity with the increase in the level number.

Level 0: Context diagram

It shows a larger image of the process. However, it doesn't include all the details. It only contains one process node and its connections with the entities.

Level 1: Process decomposition

They are like level 1 but this level is more detailed. We break the diagram into smaller steps and explain each process step.

Level 2: Deeper dives

This layer further breaks down each process of level 1. The aim is to provide the detail of every little step. This helps us understand the system better before and while working on it.

The rules of a DFD

  • The processes must have an input and an output.

  • Data stores should have at least one data flow in and one data flow out without crossing each other.

  • Each external entity must communicate with the system.

  • All processes must go to another process, entity, or data store.

How to make a DFD

Now that we know what a DFD is, we can now make one by following these steps:

  1. Identify external entities: This step includes identifying the input and output. It begins with an external entity and ends with an entity. Every process must have an input and an output.

  2. Build the diagram: Every DFD starts with a context diagram. We include a process node and connect it with related entities. The external entities are usually placed at the boundaries.

  3. Expand the diagram: Using our level-0 diagram, we create a more detailed diagram by dividing the processes into sub-processes. We also include the complete flow of the system and data stores. We keep expanding as per our needs.

  4. Validate the diagram: We cross-check if our diagram isn't violating any of the DFD rules and guidelines we discussed earlier.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved