Skip to content
Back

Guide 5 min read

DFD Level 0 and Level 1 explained with examples

Context diagram versus decomposition. Processes, data stores, and flows that match Chapter 4 text figure for figure.

Data Flow Diagrams (DFDs) are a cornerstone of Chapter 3 and Chapter 4 system specifications. Yet students routinely lose marks for violating fundamental DFD rules, such as direct data flows between external entities or data stores communicating without an intermediary process.

1. DFD Level 0: The Context Diagram

The Level 0 DFD defines the system boundary. It represents the entire application as a single central process connected exclusively to External Entities (users, external services, payment gateways).

Key rules for Level 0:

  • Exactly one central process representing the entire system.
  • No data stores visible at Level 0 (they reside inside the central system).
  • Only directional input and output data flows between external entities and the system.
graph LR
    Student[External Entity: Student] -->|Git Repository URL| System((0.0 UniReport System))
    System -->|Compiled Dissertation DOCX| Student
    System -->|Query Metadata| GitHubAPI[External Entity: GitHub API]
    GitHubAPI -->|AST & File Tree| System

2. DFD Level 1: Functional Decomposition

The Level 1 DFD decomposes the central process into sub-processes, introducing Data Stores and internal routing.

Crucial consistency guidelines:

  1. Rule of Conservation: Every data flow entering or exiting the Level 0 system must appear in Level 1 (input/output balance).
  2. No Black Holes: Every process must have at least one input and one output.
  3. No Miracle Processes: A process cannot produce output without corresponding input.
  4. Data Store Rule: Data stores cannot talk directly to each other or to external entities; they must pass through a process.
graph TD
    User([Student]) -->|Raw Files| P1(1.0 AST Scanner)
    P1 -->|Code Metadata| D1[(D1: Manifest Store)]
    D1 -->|Structural Entities| P2(2.0 Chapter Drafter)
    P2 -->|Draft Markdown| D2[(D2: Section Store)]
    D2 -->|Raw Sections| P3(3.0 Cadence Linter)
    P3 -->|Validated Content| P4(4.0 DOCX Assembler)
    P4 -->|Finished Manuscript| User

UniReport automatically verifies that diagram inputs and outputs correspond strictly to your manifest data and route handlers.

Draft your dissertation with UniReport

Connect the UniReport MCP server to Cursor or Claude Code and draft publication-grade chapters grounded in your real code.

Connect MCP Read Docs