How to :
Data Flow
Diagrams (DFDs)
Data Flow Diagram: Developed By Larry Constantine as a way
of expressing system requirements in graphical Form:
Data Flow Models (DFMs) are easy to understand and, with a
little practice, reasonably quick and straightforward to develop
They consist of two parts: a set of Data Flow Diagrams (DFDs)
and a set of associated textual descriptions
… that provide us with the truly effective tool for
understanding the information processes of a system
Objectives of Data Flow Diagram:
To define what is meant by structured analysis.
To define the symbols used in a Data Flow Diagram
(DFD).
To draw a context diagram (Level 0 DFD) for a given
scenario.
To refine a DFD to a more detailed (lower-level) view.
Using Data Flow Diagrams:
Structured approach - take a top-down approach to system
development.
System is defined first at a general level – overview.
Successive refinement occurs until the bottom (primitive)
levels are defined.
Primitive level - point where specifications can be
translated into lines of code.
So...system is decomposed into small modules that perform
simple tasks.
Structured Development:
Definition is from top to bottom in increasing levels
of detail.
Major flows and processes identified .
These are exploded into Sub-processes.
Sub-processes are exploded into more detail.
This process can continue to the primitive level,
where programming begins directly from the
exploded diagram.
Logical DFDs:
Shows sources and sinks (destinations) of data
Identifies and names the logical functions (processes) of the
system.
Identifies and names the groups of data elements that connect
one process to another.
Identifies the data stores.
Each function broken down into more detailed DFD (levels).
Descriptions of processes, flows, stores, elements recorded in
data dictionary.
Logical DFDs:
All of the above documentation comprises a logical
functional specification for an existing or new
system.
A detailed statement of what the system does/is to do.
Free from physical considerations of how it will be
implemented.
DFD is not a FlowChart!
Flow chart shows “ flow of Control “ .
DFD shows “ flow of Data”
The flowchart describes boxes that
describe computations, decisions,
interactions & loops.
It is important to keep in mind that
data flow diagrams are not flowcharts
and should not include control
elements.
DFD Symbols (Gane &
Sarson) Four Elements of
DFD
Process
Data
Flow
Data
Data Flow Diagrams
(DFDs)
Data flow CUSTOMER
Orde
r
In-Stock Request
WAREHOUSE
diagram (DFD) is Status
Messag
1.
0
a picture of the
e Shippin
Chec
Status k g
Data Statu Order
movement of Shipping
2.
0
s Orde
r
Data 3.
data between Confirmati Pendin 0
Issue D1 g
on Status
Orders Generat
Message
external entities s Shippin
e
Order g
Data Order
and the
Paymen 4.
t 0
Order
Invoic
Data
processes and
e Manage
Accounts
Receivab
le 5.
data stores within Accounting
Data
Accounts Receivable
Data
0
Produc
a system Accounts e
D2 Receivab Report
le Invento s
ry
Reports
ACCOUNTING
DFD – Customer Order Processing
Orde In-Stock Request
CUSTOMER r WAREHOUSE
1.
Status
0
Messag
e Shippin
Chec
Status k g
Data Statu Order
s Orde
2. r
0 Data
Shipping 3.
Confirmati Pendin 0
Issue D1 g
on Status
Orders Generat
Message
s Shippin
e
Order g
Data Order
Paymen 4.
t 0
Order
Invoic
Manage Data
e
Accounts
Receivab
le 5.
Accounts Receivable 0
Accounting
Data Data
Produc
Accounts e
D2 Receivab Report
le Invento s
ry
Reports
ACCOUNTING
Proces
s Grade
1.
0
Grade
Detail Report
Produc
e
Grade
Report
Work or actions performed on data
(inside the system)
Labels should be verb phrases
Receives input data and produces
output
Rule 1:
Process
Can have more than one outgoing
data flow or more than one incoming
data flow
1.
Graded
0
Submitted Work
Grade
Work Stude Student
nt Grade
Work
3.
Hours 0
Worked Gross
Calculate
Pay Pay
d
Rate Gross
Pay
Rule 2:
Process
Can connect to any other symbol
(including another process symbol)
1. 2. Invento
Orde 0 Accepted 0 ry
r Order Change
Verif Assembl
y e
Orde Order
r
Process:
Correct/Incorrect?
Services
5.
0 Invoic
Perfomed e
Creat
e
Invoic
e
Policy Number Payment
Amount
Apply
Insuranc
e
Premiu
m
2.
Hours 1
Pay
Calculat
Worked Rate
e Gross
Pay
Data
Flow Deposit
Is a path for data to move from one part
of the IS to another
Arrows depicting movement of data
Can represent flow between process
and data store by two separate
arrows
2.
Payment
1
Detail
D Accounts
Invoice
Post 1 Receivabl
Detail
Payme e
nt
Data Flow:
Correct/Incorrect? 5.0
Post
Paymen
t
Course
s
Custom
er
Payment
Clas
s D2 Daily
List Payments
Daily
Payme
Student nt
s
6.0
Prepar
e
Deposi
t
Data
Store D1 Student
s
Is used in a DFD to represent data
that the system stores
Labels should be noun phrases
Rule: Data
Store
Must have at least one incoming
and one outgoing data flow
Customer
Payment
D1 Daily
Payment
s
Daily
Payment
Data Store:
Correct/Incorrect?
2. D2 Accounts
0 Receivab
le
Boo
k
Fligh Invoic
t Payme
e
Detail nt
Detail
Fight
Reque
st
3.
0
Post
Passenger
Payme
s nt
Source/Sink (External
Entity) Orde
r
1.
0
CUSTOMER
Invoic
e Verif
y
Orde
r
External entity that is origin or
destination of data (outside the
system)
Is the singular form of a department,
outside organisation, other IS, or
person
Labels should be noun phrases
Source – Entity that supplies data
to the system
Sink – Entity that receives data
Rule:
Source/Sink
Must be connected to a process by a
data flow
BANK
Bank
Depos
it
2.0
Prepar
e
Deposi
t
Source/Sink:
Correct/Incorrect?
PAYROLL
CUSTOMER CUSTOMER
DEPARTMENT
Paycheck
Payme Payme
nt
nt
EMPLOYEE 3.
0 Accounts
Receivab
Apply le
Payme
nt
Rules for Using DFD
Symbols
Data Flow That
Connects YES
A process to another process NO
A process to an external entity
A process to a data store
An external entity to another external entity
An external entity to a data store
A data store to another data store
List the errors of this
DFD
DF
E1 2 1.
0
DF P2
5
DF DS
1 1
DF
3
DF
6
2.
DF
0
4
DF P1
2
E1
Context Diagram or Level 0
DFD
Top-level view of IS
Shows the system boundaries, external
entities that interact with the system, and
major information flows between entities and
the system.
It’s designed to be an abstraction view, showing the
system as a single process with its relationship to
external entities. It represents the entire system as a
single bubble with input and output data indicated
by incoming/outgoing arrows.
Example: Order system that a company
uses to enter orders and apply payments
against a customer’s balance
Orde
Context Diagram r
CUSTOMER WAREHOUSE
of Order System
Order
Pickin
g List
Rejec
Payme Invoic t
nt e Notic
e
0 Complete
d Order
Order
Syste
m
Bank Cash
Commissio Receipt
n Depos
it s Entry
SALES
ACCOUNTING BANK
REP
Data flow diagram of a travel agent booking system: Level-0
Customer
Travel-query Available flights
Book flights
flight
Booking
Booking
confirmation
Level-1
DFD
Shows the system’s major processes, data
flows, and data stores at a high level of
abstraction
When the Context Diagram is expanded into
DFD level-0, all the connections that flow
into and out of process 0 needs to be
retained.
Orde
Context Diagram r
CUSTOMER WAREHOUSE
of Order System
Order
Pickin
g List
Rejec
Payme Invoic t
nt e Notic
e
0 Complete
d Order
Order
Syste
m
Bank Cash
Commissio Receipt
n Depos
it s Entry
SALES
ACCOUNTING BANK
REP
Orde Picking
r List
Level-1 DFD CUSTOMER WAREHOUSE
of Order 1.
System 0
Fill
Order Orde
r
Rejec
t
Notic
Invoic e
e
2.
0
Payme
nt Creat Complet
Invoic
e ed Order
e
Invoic
Accounts
D1 e
Receivabl
e
Invoic 3.
Payme e
nt 0
Detail
Detail
Apply
Payme
nt
Commissio Bank Cash Receipts
n Deposit Entry
SALES
BANK ACCOUNTING
REP
Lower-Level
Diagrams
Functional Decomposition
An iterative process of breaking a system
description down into finer and finer detail
Uses a series of increasingly detailed
DFDs to describe an IS
Balancing
The conservation of inputs and outputs to a
data flow process when that process is
decomposed to a lower level
Ensures that the input and output data
flows of the parent DFD are maintained on
the child DFD
Strategies for Developing
DFDs
Top-down strategy
Createthe high-level diagrams
(Context Diagram), then low-level
diagrams (Level-0 diagram), and so
on
Bottom-up strategy
Createthe low-level diagrams, then
higher- level diagrams
Exercis
e:
Precision Tools sells a line of high-quality
woodworking tools. When customers place orders
on the company’s Web site, the system checks to
see if the items are in stock, issues a status
message to the customer, and generates a
shipping order to the warehouse, which fills the
order. When the order is shipped, the customer is
billed.
The system also produces various reports.
Draw a context diagram for the order system
Draw DFD diagram 0 for the order system
Identify Entities,Process,Data Stores & Data
Flow
Entities Data Flows
Customer Order
Warehouse In-Stock
1.
Accounting Request
0
Order Data
Processes
2.
1.0 Check Status Status Data
0
Status
2.0 Issue Status
Message 3.
Messages 0
Shipping Order
3.0 Generate Shipping
Order Order Data
Shipping
Invoice 4.
4.0 Manage Confirmation 0
Accounts Payment
Receivable
Accounting Data
Accounts Receivable
5.0 Produce
Data 5.
Reports
Order Data 0
Data Stores
Orde
r
CUSTOMER In- WAREHOUSE
Payme Stock
nt Reque
st
Statu 0 Shippin
sMessage Order
g
Order
Invoic Shipping
e Syste Confirmation
m
Invento
ry
Reports
Context Diagram ACCOUNTING
(Level 0) of Order
System
Orde In-Stock
CUSTOMER r Request WAREHOUSE
1.
Status
0
Messag
e Shippin
Chec
Status k g
Data Statu Order
s Orde
2. r
0 Data
Shipping 3.0
Confirmati Pendin
Issue D1 g
on Status Orders Generat
Message
s eShippin
Order g
Data Order
Payme 4.
nt 0
Order
Invoic
Manage Data
e
Accounts
Receivabl
e 5.
Accounts Receivable 0
Accounting
Data Data
Produc
Accounts e
D2 Report
Receivabl
e Invento s
Level-1 of ry
Reports
Order
System ACCOUNTING
It is also known as a context diagram. It’s designed to be an abstraction view, showing the
system as a single process with its relationship to external entities.
In 1-level DFD, the context
diagram is decomposed into
multiple bubbles/processes.
2-Level DFD can be used to plan or record the specific/necessary detail
about the system’s functioning.