Software Design · Software Engineering

Data Flow Diagram (DFD)

Watch lectures

Data Flow Diagram (DFD)

Definition

A Data Flow Diagram (DFD) is a graphical representation of how data flows through a system — showing processes, data stores, external entities, and the data flows connecting them, WITHOUT showing control logic or timing.

DFD Symbols (Yourdon/DeMarco Notation)

Symbol Meaning
Circle / Rounded Rectangle Process — transforms input data into output data
Rectangle External Entity — source or destination of data outside the system (user, other system)
Open-ended Rectangle / Two parallel lines Data Store — where data is held (file, database table)
Arrow Data Flow — direction of data movement, labeled with the data name

Levels of DFD

Context Diagram (Level 0)

  • Shows the entire system as a single process
  • Shows external entities and the data flows in/out of the system
  • No internal detail

Level 1 DFD

  • Decomposes the single process into major sub-processes
  • Shows internal data stores and flows between sub-processes

Level 2+ DFD

  • Further decomposes any Level 1 process into more detail, as needed
  • Decomposition continues until processes are simple enough to specify directly

Example: Simple Order System (Level 1)

[Customer] ──order──▶ (1.0 Process Order) ──order details──▶ [Order Data Store]
                              │
                        confirmation
                              ▼
                        [Customer]

Rules for DFDs

  • Every process must have at least one input and one output
  • Data cannot flow directly between two external entities (must go through a process)
  • Data cannot flow directly between two data stores (must go through a process)
  • Each process should be numbered consistently across levels (e.g., Process 1 decomposes into 1.1, 1.2, ...)

Advantages

  • Simple, intuitive graphical notation
  • Good for communicating with non-technical stakeholders
  • Basis for Structured Design (DFD → Structure Chart via Transform/Transaction Analysis)

Limitations

  • Doesn't show timing, sequencing, or control logic
  • Doesn't scale well visually for very complex systems without careful leveling

Exam tip: Practice drawing a Context Diagram (Level 0) and a Level 1 DFD for a simple system (Library, ATM, Order Processing) — a near-guaranteed diagram question. Remember the "no direct entity-to-entity or store-to-store flow" rule.

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

← All Software Engineering modules