You are on page 1of 39

DATA FLOW

DIAGRAMS
(DFDs)
Data Flow Diagrams
A graphical tool, useful for communicating with
users, managers, and other personnel.
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.
A relatively simple technique to learn and use.
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 entities)


Data flows
Processes
Data Stores
External Entities
External
A Rectangle represents Entities
an external entity
They either supply or
receive data • Source – Entity that
They do not process data supplies data to the
system.
• Sink – Entity that
receives data from the
system.
Data Flows
Data in motion
Marks movement of data
through the system - a pipeline
to carry data. Data Flow
Connects the processes, external
entities and data stores.
 Generally unidirectional, If same
data flows in both directions,
double-headed arrow can be
used.
Delivery Slip

Processes Stores demand


note
1.
STORES
Issue Slip

A circle represents a process


Straight line with incoming arrows are input data
flows
Straight lines with outgoing arrows are output data
flows
Labels are assigned to Data flow. These aid
documentation
Data Stores
D1 Data Stores D1 Data Stores D1 Data Stores

Writing Reading

A Data Store is a repository of data


Data can be written into the data store. This is
depicted by an incoming arrow
Data can be read from a data store. This is depicted
by an outgoing arrow
External entity cannot read or write to the data store
Two data stores cannot be connected by a data flow
Rules of Data Flow
Data can flow from Data cannot flow from

External entity to process External entity to


Process to external entity external entity
Process to store and back External entity to store
Process to process Store to external entity
Store to store
Data Flow Diagrams
An alternate notation is often used:

3 Label
A Process Store
Name
Issue

A Data Store D1 Data Stores Name

Label
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
Decomposition of DFDs
A system is too complex to be shown on a single DFD.
Decomposition is the iterative process of exploding
data flow diagrams to create more detail.
Level 0 data flow diagrams may be exploded into
successive low levels of detail. The next level of detail
would be a level 1 data flow diagram.
The DFDs become linked together in
a hierarchy, which would fully
document the system.
Why Level DFD
If a DFD is too detailed it will have too many
data flows and will be large and difficult to
understand
Start from a broad overview. Expand to details –
Idea similar to using procedures and linking
these with a main program
Each DFD must deal with one aspect of a big
system
Levels of DFD
Context diagram
Level-0 diagram (System diagram)
Level-n diagram
- Detail of one process from next
highest level

Primitive diagram (Lowest level DFD)


Levelling Rules
If a process p is expanded, the process at the next level
are labelled as p.1, p.2 etc.
All data flow entering or leaving p must also enter or
leave it’s expanded version
Expanded DFD may have data stores
No external entity can appear in expanded DFD
Keep the number of processes at each level less than 7
Balancing DFDs
Information presented at one
level of a DFD is accurately
represented in the next level
DFD.
Ensures that the input and
output data flows of the
parent DFD are maintained
on the child DFD.
Creating DFDs
Create a preliminary Context Diagram.
Identify Use Cases, i.e. the ways in which users most
commonly use the system.
Create DFD fragments for each use case.
Create a Level 0 diagram from fragments.
Decompose to Level 1,2,…
Validate DFDs with users.
Creating the Context 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.
Draw in external entities as the
source or destination of the
data flows.
Creating Level 0 Diagram
Combine the set of
DFD fragments into
one diagram.
Generally move from
top to bottom, left to
right.
Minimize crossed lines.
Creating Level 1 Diagram
Each use case is turned into its own DFD.
Take the steps listed on the use case and depict
each as a process on the level 1 DFD.
Inputs and outputs listed on use case become data
flows on DFD.
Include sources and destinations of data flows to
processes and stores within the DFD.
May also include external entities for clarity.
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.
Validating DFD

Check for syntax errors to


assure correct DFD structure.
Check for semantics errors
to assure accuracy of DFD
relative to actual/desired
system.
DFD for University Admission System
Context Diagram

Student Information Report Request


0
0
University
Student Staff
University
Student Staff
Admission
Admission
System
System
Admission Approval Report
or Rejection
Level 0

Student Report Request


Information Student
Name & ID Data Item
1
1 33
Prompt
Admission Approval Perform Generate
Perform Generate
Student
Student Staff
Staff
or Rejection Intake Reports Data
Intake Reports
Procedure
Procedure Data Items
Query
Prior
Report
Approved Application Data
Application Data
D1
D1 Student
Student Data
Data
Verified
Approved
22 Application
Maintain
Maintain
Student
Student Other Student Data
Information
Information
Request for Student
Information Maintenance
Level 1 Process 1, Perform Intake Procedure

Student
Information
Admission Application
1.1
1.1 1.2
1.2
Student
Student
Receive
Receive Verify
Verify
Admission
Admission Student Name Admission
Admission
Application
Application and ID Application
Application

Verified
Prior Admission
Application D1
D1 Student
Student Data
Data Application
Data
Application
Application Data
Request
Application Approval 1.3
1.3
or Rejection Approved Application
Review
Review
Admission
Admission
Application
Application
Level 1 Process 2, Maintain Student
Information

Approved Application 2.2


2.2
to Add
Add
Add New
New
Student
Student
Verified Approved
Verified Changed Application
Student Data
2.3
2.3
Approved Application Approved Application to Edit Edit
2.1
2.1 Edit Existing
Existing
Student
Student
Request for Student Determine ID of Student D1 Student
Determine D1 Student Data
Data
Information Maintenance Operation to Delete
Operation 2.4
2.4
Delete Verified ID of
Delete
Existing Student to Delete
Existing
Student
Student
2.5
2.5
Determination to Cancel
Cancel Operation Cancel
Operation
Operation
DFD for Lemonade Stand
Context Diagram

Sales Forecast
Order 0.0
0.0
CUSTOMER
CUSTOMER Lemonade
Lemonade Production Schedule EMPLOYEE
EMPLOYEE
Product Served System
System Pay
Payment Time Worked
Received Goods
Payment
Purchase Order

VENDOR
VENDOR
Level 0

1.0
1.0
Sale
Sale
Customer Order Sales Forecast
Product Ordered
Payment
2.0
2.0 Production
CUSTOMER
CUSTOMER EMPLOYEE
EMPLOYEE
Production
Production Schedule
Product Served

Received Goods Inventory


3.0
3.0
VENDOR
VENDOR Procure-
Procure- Order
Purchase Order ment
ment Decisions
Payment
Pay Time Worked

4.0
4.0
Payroll
Payroll
Level 1, Process 1

CUSTOMER
Customer Order
ORDER
Request for Forecast

1.1
1.1
Record
Record
Order
Order 1.3
1.3
Produce
Produce
Severed Order Sales
Sales
Payment Forecast
Forecast Sales Forecast

1.2
1.2
Receive
Receive PAYMENT
Payment
Payment
Level 1, Process 2 and Process 3

Order Decision
Product Order PURCHASE
3.1
3.1 ORDER
ORDER Produce
Produce
Purchase
Purchase
2.1
2.1 Order Quantity On-Hand
Serve Order
Serve Quantity Severed RAW
Product
Product Quantity MATERIALS
RAW
Received Received
Production Goods
MATERIALS
Schedule 3.2
3.2
2.2 Receive
Receive
2.2
Produce Quantity Used Items
Items
Produce RECEIVED
Product
Product ITEMS
Payment Approval
INVENTORTY
Production Data
VENDOR
3.3
3.3
2.3 Pay
Pay
2.3 Quantity Produced &
Store Vendor
Vendor
Store Location Stored
Product
Product
Payment
Level 1, Process 4

Time Worked

4.1 TIME CARDS


4.1
Record
Record
Time
Time
Worked Employee ID
Worked
EMPLOYEE

Payroll Request
4.2
4.2 Unpaid time cards
Calculate
Calculate
Payroll
Payroll
PAYROLL

Payment Approval

4.3
4.3
Pay
Pay
Employe
Employe
ee PAYMENTS

Payment
1.1
1.1 1.2
1.2
1.0
Process Decomposition
1.0 Record Receive
Sale Record Receive
Sale Order Payment
Order Payment

2.1
2.1 2.2
2.2 2.3
2.3
2.0
2.0 Serve
Serve Produce
Produce Store
Store
Production
Production Product
Product Product
Product Product
Product

0.0
0.0
Lemonade
Lemonade
System
System 3.1
3.1
3.0
3.0 3.2
3.2 3.3
3.3
Produce
Produce
Procure-
Procure- Receive
Receive Pay
Pay
Purchase
Purchase
ment
ment Items
Items Vendor
Vendor
Order
Order

4.1
4.1 4.3
4.3
4.2
4.2
4.0
4.0 Record
Record Pay
Pay
Calculate
Calculate
Payroll
Payroll Time
Time Employe
Employe
Payroll
Payroll
Worked
Worked ee

Context Level Level 0 Level 1


Logical and Physical DFD
DFDs considered so far are called logical DFDs
A physical DFD is similar to a document flow diagram
It specifies who does the operations specified by the
logical DFD
Physical DFD may depict physical movements of the
goods
Physical DFDs can be drawn during fact gathering
phase of a life cycle
Physical DFD for Cheque Encashment
Cash

Token

Clerk
Clerk
Cheque Cashier
Cashier
Verify
Verify A/C
A/C
CUSTOMER Verify
Verify Token
Token
CUSTOMER Signature
Signature Update
Update Cheque with Take Signature
Take Signature
Balance
Balance Token number
Token

Bad Cheque

Customer Accounts Store cheques Entry in Day Book


Logical DFD for Cheque Encashment
Cheque with
Retrieve
Retrieve Cheque Check
Check Store
Store Token
Token
Token
Customer
Customer Balance,
Balance, no
no &
&
Record
Record Issue
Issue token
token cheques
cheques

Customer Accounts Token Slip Store cheques


Cheque
or Cheque

Update
Update
CUSTOMER
CUSTOMER
Search
Search && Daily
Daily cash
cash
match token
match token book
book
Token Slip Cheque
with token

Entry in Day
Cash Book
Questions
???
In a DFD external entities are represented by a
a. Rectangle
b. Ellipse
c. Diamond shaped box
d. Circle
 External Entities may be a
a. Source of input data only
b. Source of input data or destination of results
c. Destination of results only
d. Repository of data
 A data store in a DFD represents
a. A sequential file
b. A disk store
c. A repository of data
d. A random access memory
By an external entity we mean a
a. Unit outside the system being designed which can be controlled by an analyst
b. Unit outside the system whose behaviour is independent of the system being
designed
c. A unit external to the system being designed
d. A unit which is not part of DFD
 A data flow can
a. Only enter a data store
b. Only leave a data store
c. Enter or leave a data store
d. Either enter or leave a data store but not both
 A circle in a DFD represents
a. A data store
b. A an external entity
c. A process
d. An input unit
Thanks for
your
Cooperation

You might also like