What is a Data Flow Diagram?
• A data flow diagram (DFD) is a graphical representation
of the movement of data between external entities,
processes and data stores within a system.
• DFD’s show how data moves through an information
system.
1
DFD Symbols
2
Process
1.0
Grade Detail Grade Report
Produce
Grade
Report
– The work or actions performed on data so that
they are transformed, stored, or distributed.
– Process labels should be verb phrases!
3
Data Flow
2.1
Payment Detail
D1 Accounts
Post Invoice Detail Receivable
Payment
– A path for data to move from one part of the system
to another.
– Data in motion!
• Arrows depict the movement of data.
– NO VERBS
4
Data Store
D1 Students
– Used in a DFD to represent data that the system
stores
– Data at rest!
– Labels should be noun phrases
• (NO VERBS)
5
External Entity
1.0
Order
CUSTOMER Invoice
Verify
Order
– The origin or destination of data!
• This represents things outside of the system.
– Source – Entity that supplies data to the system.
– Sink – Entity that receives data from the system.
– The labels should be noun phrases! 6
General DFD Rules
YES NO
A process to another process
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
7
Creating Data Flow Diagrams
1. Create a list of activities
2. Construct Context Level DFD
(identifies external entities and processes)
3. Construct Level 0 DFD
(identifies manageable sub process )
4. Construct Level 1- n DFD
(identifies actual data flows and data stores )
5. Check against rules of DFD
DFD Naming Guidelines
• External Entity Noun
• Data Flow Names of data
• Process verb phrase
– a system name
– a subsystem name
• Data Store Noun
Creating Data Flow Diagrams
Lemonade Stand Example
Creating Data Flow Diagrams
Example Steps:
The operations of a 1. Create a list of activities
simple lemonade stand • Old way: no Use-Case Diagram
will be used to
demonstrate the creation • New way: use Use-Case Diagram
of dataflow diagrams. 2. Construct Context Level DFD
(identifies sources and sink)
3. Construct Level 0 DFD
(identifies manageable sub processes )
4. Construct Level 1- n DFD
(identifies actual data flows and data
stores )
Creating Data Flow Diagrams
Example 1. Create a list of activities
Think through the
activities that take place at
a lemonade stand.
Customer Order
Serve Product
Collect Payment
Produce Product
Store Product
Creating Data Flow Diagrams
Example 1. Create a list of activities
Also think of the additional
activities needed to
support the basic
activities.
Customer Order
Serve Product
Collect Payment
Produce Product
Store Product
Order Raw Materials
Pay for Raw Materials
Pay for Labor
Creating Data Flow Diagrams
Example 1. Create a list of activities
Group these activities in
some logical fashion,
possibly functional areas.
Customer Order
Serve Product
Collect Payment
Produce Product
Store Product
Order Raw Materials
Pay for Raw Materials
Pay for Labor
Creating Data Flow Diagrams
Example 2. Construct Context Level DFD
(identifies sources and sink)
Create a context level
diagram identifying the Context Level DFD
sources and sinks (users).
Sales Forecast
Order
0.0 Production
Customer Order CUSTOMER Lemonad Schedule EMPLOYEE
Product Served e System Pay
Serve Product
Collect Payment Payment
Time Worked
Received Goods
Produce Product Payment
Purchase Order
Store Product
Order Raw Materials VENDOR
Pay for Raw Materials
Pay for Labor
Creating Data Flow Diagrams
Example 3. Construct Level 0 DFD
(identifies manageable sub processes )
Create a level 0 diagram
identifying the logical Level 0 DFD
subsystems that may exist.
1.0
Sale
Sales Forecast
Customer Order Customer Order
Serve Product Product Ordered
Payment
Collect Payment 2.0
Production
CUSTOMER Producti EMPLOYEE
Product Served on Schedule
Produce Product
Store Product Received Goods Inventory
3.0
VENDOR Procure- Order
Order Raw Materials Purchase Order ment Decisions
Pay for Raw Materials Payment
Pay Time Worked
Pay for Labor 4.0
Payroll
Creating Data Flow Diagrams
Example 4. Construct Level 1- n DFD
Create a level 1 (identifies actual data flows and data stores )
decomposing the Level 1 DFD
processes in level 0 and
identifying data stores. CUSTOMER
Customer Order
Request for
Customer Order ORDER Forecast
Serve Product 1.1
Record
Collect Payment Order
1.3
Produce
Severed Order Sales
Produce Product Payment Forecast
Sales Forecast
Store Product
1.2
Receive PAYMENT
Order Raw Materials Payment
Pay for Raw Materials
Pay for Labor
Creating Data Flow Diagrams
Example 4. Construct Level 1 (continued)
Create a level 1 Level 1 DFD
decomposing the
processes in level 0 and Product Order
identifying data stores. ORDER
2.1
Customer Order Serve Quantity
Serve Product Product Severed
Collect Payment RAW
Production MATERIALS
Schedule
Produce Product 2.2
Store Product Produce Quantity Used
Product
INVENTORT
Order Raw Materials Production Data Y
Pay for Raw Materials
2.3 Quantity Produced &
Store
Pay for Labor Product
Location Stored
Creating Data Flow Diagrams
Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the Level 1 DFD
processes in level 0 and Order Decision
PURCHASE
identifying data stores. 3.1 ORDER
Produce
Purchas
Customer Order e Order Quantity On-Hand
Serve Product Quantity
RAW
MATERIALS
Collect Payment Received Received
Goods
3.2
Produce Product Receive
Items
Store Product RECEIVED
ITEMS
Payment Approval
Order Raw Materials
VENDOR
Pay for Raw Materials 3.3
Pay
Vendor
Pay for Labor
Payment
Creating Data Flow Diagrams
Example Level 1 DFD
Create a level 1
4. Construct Level 1 (continued)
decomposing the
processes in level 0 and Time Worked
identifying data stores. 4.1 TIME CARDS
Record
Time
Customer Order Worked Employee ID
Serve Product EMPLOYEE
Collect Payment Payroll Request
4.2 Unpaid time
Calculat
Produce Product e
cards
Store Product Payroll PAYROLL
Payment Approval
Order Raw Materials
4.3
Pay for Raw Materials Pay
Employ
ee PAYMENTS
Pay for Labor
Payment
Process Decomposition
1.2
1.1
1.0 Receive
Record
Sale Paymen
Order
t
2.0 2.1 2.2 2.3
Producti Serve Produce Store
on Product Product Product
0.0
Lemona
de
System 3.1
3.0 3.2 3.3
Produce
Procure- Receive Pay
Purchas
ment Items Vendor
e Order
4.1 4.2 4.3
4.0 Record Calculat Pay
Payroll Time e Employ
Worked Payroll ee
Context Level Level 0 Level 1
DFD Example: Bus Garage Repairs
• Buses come to a garage for repairs.
• A mechanic and helper perform the repair, record the
reason for the repair and record the total cost of all parts
used on a Shop Repair Order.
• Information on labor, parts and repair outcome is used for
billing by the Accounting Department, parts monitoring by
the inventory management computer system and a
performance review by the supervisor.
DFD Example: Bus Garage Repairs (cont’d)
• External Entities: Bus, Mechanic, Helper, Supervisor, Inventory
Management System, Accounting Department, etc.
• Key process (“the system”): performing repairs and storing information
related to repairs
• Processes:
– Record Bus ID and reason for repair
– Determine parts needed
– Perform repair
– Calculate parts extended and total cost
– Record labor hours, cost
DFD Example: Bus Garage Repairs (cont’d)
• Data stores:
– Personnel file
– Repairs file
– Bus master list
– Parts list
• Data flows:
– Repair order
– Bus record
– Parts record
– Employee timecard
– Invoices
Bus Garage Context Diagram
Bus
Mechanical Fixed
problem mechanical
to be repaired problems
Repair Supervisor
Helper Labor
Bus Repair summary
Process
System List of parts
used Inventory
Labor Management
Labor, parts
System
cost details
Mechanic
Accounting