Data Flow Diagrams
(DFD)
DATA FLOW DIAGRAM
● A data-flow diagram is a way of representing a flow of data
through a process or a system.
● Used to perform structured analysis to determine logical
requirements.
● Useful for analyzing existing as well as proposed
systems.
● Focus on the movement of data between external entities
and processes, and between processes and data stores.
Why DFD ?
● Provides an overview of-
● What data a system processes
● What transformations are performed
● What data are stored
● What results are produced and where they flow
● Graphical nature makes it a good communication tool
between-
● User and analyst
● Analyst and System designer
DFD elements
● Source/Sinks (External entity)
● Processes
● Data Stores
● Data flows
Symbols Used:
Symbol Gane & Sarson DeMarco &
Symbol Yourdan Symbol
External Entity
NAME NAME
Process NAME NAME
Data Store D1 NAME D1 NAME
Data flow Name Name
Descriptions :
External Entity - people or organisations that send data
into the system or receive data from the system.
Process - models what happens to the data
i.e. transforms incoming data into outgoing data.
Data Store - represents permanent data that is used by the
system.
Data Flow - models the actual flow of the data between
the other elements.
Source: slideshare
External Entities
They either supply or receive data
● Source – Entity that supplies data to the system.
● Sink – Entity that receives data from the system.
They do not process data
Source: slideshare
Processes
● Work or actions performed on data
● Straight line with incoming arrows are input data flows
● Straight lines with outgoing arrows are output data flows
● Labels are assigned to Data flow.
Source: slideshare
Contd..
Grade Report
Produce Grade Report
Grade Detail
Source:slideshare
Contd..
● Can have more than one outgoing data flow or more
than one incoming data flow.
Source:slideshare
Contd..
Can connect to any other symbol (including another
process symbol)
Source:slideshare
Data Stores
● A Data Store is a repository of data
● Data can be written into the data store. An incoming
arrow represents writing data
● Data can be read from a data store. An outgoing arrow
represents reading of data
Source: slideshare
Data Flows
● Data in motion
● Marks movements of data through the system pipeline
to carry data.
● Connects the processes, external entities and data
stores.
Data FLow
Source: slideshare
Data Flow
● Generally unidirectional, if same data flows in both
directions, double-headed arrow can be used.
● Can represent flow between process and data store by
two separate arrows.
Source: slideshare
Decomposition Of DFD
Levels Description Explanation
Level 0 Context diagram Contains only
one process
Level 1 Overview Utilizes all four
diagram elements
Level 2 Detailed diagram A breakdown of
a level 1 process
Source: slideshare
Level 0 Diagram
● One process represents the entire system.
● Data arrows show input and output.
● Data Stores NOT shown.
● Data stores are implicitly contained within the system.
Source: slideshare
Contd..
Source: slideshare
Level 1 Diagram
● Level 1 DFD, must balance with the context diagram it
describes.
● Input going into a process are different from outputs
leaving the process.
● Data stores are first shown at this level.
Source: slideshare
Level 2 Diagram
● Level 2 DFD must balance with the Level 1 describes.
● Input going into a process are different from outputs
leaving the process.
● Continue to show data stores.
Source: slideshare
Layers of DFD Abstraction
Source: slideshare
Rules of Data Flow
Data can flow from Data can not flow from
➔ External entity to process ➔ External entity to external entity
➔ Process to external entity ➔ External entity to store
➔ Process to store and back ➔ Store to external entity
➔ Process to process ➔ Store to store
Source: slideshare
Three INCORRECT Data Flow
● Miracle
● Black Hole
● Gray Hole
Source: slideshare
Good Style in Drawing DFD
● Use meaningful names for data flows, processes and data stores.
● Use top down development starting from context diagram and
successively levelling DFD
● Only previously stored data can be read
● A process can only transfer input to output. It cannot create new data
● Data stores cannot create new data
Source: slideshare
Creating the Level 0 Diagram
● Draw one process representing the entire system
(process 0)
● Find all inputs and outputs that come from or go to
external entities; draw as data flows.
Source: slideshare
Creating Level 1 Diagram
● Draw the data-flows between the external entities
and processes
● Identify data stores by finding where the data needs
to be held within the system.
● Add data-flows flowing between processes and
data stores within the system
Source: slideshare
Creating Level 2 Diagram
● Each process in level 1 DFD is broken down into
multiple processes.
● Level 2 DFD is be used to project or record the
necessary details about the system's functioning.
● Include sources and destinations of data flows to
processes and stores within the DFD.
Source: slideshare
When to stop decomposing DFDs?
● Ideally, a DFD has at least three levels.
● When the system becomes primitive i.e. lowest level is reached
and further decomposition is useless.
Source: slideshare
Validating DFD
● Do all data stores have flows both in and out? A
one-way data store is of little use.
● Are symbols correctly labelled and uniquely
referenced?
● Can the flows be reduced? If a process is too busy,
it can be broken down into two or more processes.
Source: slideshare
DFD for University Admission
System
Level 0
Source: slideshare
Level 1
Source: slideshare
Level 2 Process 1, Perform Intake Procedure
Source: slideshare
Level 2 Process 2, Maintain Student Information
Source: slideshare
Logical and Physical DFD
● DFDs considered so far are called logical DFDs
● A physical DFD specifies who does the operations
specified by the logical DFD
● Physical DFD may depict physical movements of
the goods
Source: slideshare
References
● https://www.lucidchart.com/pages/data-flow-diagram/data-
flow-diagram-symbols
● https://www.lucidchart.com/blog/data-flow-diagram-tutorial
● https://www.slideshare.net/RiteshGupta113/data-flow-
diagrams-86591972
● https://www.geeksforgeeks.org/what-is-dfddata-flow-diagram/
● https://www.visual-paradigm.com/guide/data-flow-
diagram/what-is-data-flow-diagram/
● https://en.wikipedia.org/wiki/Data-flow_diagram
Thank You!