Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Data Flow Diagram (DFD) πŸ“

Learning Goals

By the end of this section you will:

  • understand how a data flow diagrams track the movement of data through your system

  • understand the difference between data flow diagrams, use case diagrams, entity relationship diagrams and relational schemas

  • know how to create a data flow diagram

A data flow diagram (DFD) maps out the flow of information for any process or system. It uses defined symbols like rectangles, circles and arrows, plus short text labels, to show data inputs, outputs, storage points and the routes between each destination. lucidchart_2017_what

Introduction to Data Flow Diagrams (DFDs)

Data Flow Diagrams (DFDs) show how data moves through a system, focusing on inputs, processes, data stores, and outputs. Unlike Use Case Diagrams, which show user interactions, DFDs map how data is handled behind the scenes. They differ from Entity-Relationship Diagrams, which define data structure and relationships, and from Relational Schemas, which detail how data is stored in a database. DFDs help visualise system processes and data movement, not user actions or data storage design.

A Data Flow Diagram is made up from four components:

We will use the following symbols to represent the components of DFD

DFD Components

Creating a DFDΒΆ

Step 1: Identify the External EntitiesΒΆ

External entities are:

To design your DFD, consider the scenario you are addressing. What are the external sources and the destinations of data? That is, from outside of the application you are developing, who or what provides data or receives data?

Data can be provided in various ways:

Data can be received in various ways:

When considering the Student Subject Database all data is sourced from and destined for two external entities:

DFD Step 1

Step 2: Identify ProcessesΒΆ

Processes are:

Once again consider the scenario you are designing a database for. What things within the systems do some kind of work on the data passing through it. Referring back to your Use Case Diagram, can help in identifying these.

In our Student Subject Database there are three processes can occur:

DFD Step 2

Step 3: Identify Data StoresΒΆ

Data stores are:

To identify your data stores, look for groupings of associated information. In our course we will generally have one datastore, unless the prescribed requirements indicate otherwise.

We only have one data store (a digital one) in our Student Subject Database example

DFD Step 3

Step 4: Identify Data FlowsΒΆ

Data flows represent:

Here is the Student Subject Database example with all data flows added

DFD Step 4

Step 5: Decompose to next levelΒΆ

To keep DFDs to a manageable size, each process can be decomposed into more detail.

The top level DFD is called Level 0 and should only involve around seven processes. If you have more than seven, then you need to combine processes that logically fit together.

Once the Level 0 DFD is created identify any processes that require more detail. Each of these processes are then decomposed into another DFD. The first deposition is called Level 1 and subsequent decompositions, Level 2, Level 3 etc.

The processes in the subsequent decompositions inherent their numbering from their parent process.

We will decompose the Log in process in the Student Subject Database example.

DFD Step 5

Step 6: CheckingΒΆ

Now that the diagram is complete, check it against the DFD rules. You should be answering yes to all the following questions: