You are on page 1of 20

26/04/2021

BUSINESS INFORMATION
SYSTEM DESIGN
Week-7
“Data Flow Diagram (DFD)

PSMI Laboratory © 2021


Industrial and Systems Engineering Department - ITS

What are Data Flow Diagrams?


 A data flow diagram (DFD) is a graphical representation of the "flow"
of data through an information system.
 A data flow diagram can also be used for the visualization of data
processing (structured design).
 It is common practice for a designer to draw a context-level DFD first
which shows the interaction between the system and outside entities.
 This context-level DFD is then "exploded" to show more detail of the
system being modeled

1
26/04/2021

Data Flow Diagram Symbols


 There are only four symbols:
› Squares representing external entities, which are sources or
destinations of data.
› Rounded rectangles representing processes, which take data as
input, do something to it, and output it.
› Arrows representing the data flows, which can either be electronic
data or physical items.
› Open-ended rectangles representing data stores, including
electronic stores such as databases or XML files and physical stores
such as or filing cabinets or stacks of paper.

Entity
• An object which existence can be distinguished from other
objects
• Entities can be a person, an object, place, event or concept
• Example:
• Person: STUDENT, LECTURER, SUPPLIER, SELLER
• Objects: CAR, MACHINE, ROOM
• Place: COUNTRY, VILLAGE
• Event: SALES, REGISTRATION
• Concept: ACCOUNT, COURSE

2
26/04/2021

DFD Elements

DFD Symbology
6.1
Create
Process Employee
Payroll
Check

Inventory
Data Store D7
File

Entity Customer

Data Flow New Customer


Information

DeMarco-Yourdon Gane-Sarson
Examples
Symbology Symbology

3
26/04/2021

General Symbols

4
26/04/2021

• Data flow diagrams can be used to provide a clear representation of any


business function.
• The technique starts with an overall picture of the business and
continues by analyzing each of the functional areas of interest.
• This analysis can be carried out to precisely the level of detail required.

DFD Example ➔ Peeling an Apple

Apple Peeling Device Peel


S1 S2 S2
Storage Storage Disposal

Unwashed Apple Peeling Device Apple Peel

1.0 2.0 6.0


Peeling Device Apple Peel

Get Get Discard


Apple Peeling Peel
Device
5.0

Peel Apple
Unwashed Apple With Processed
Peeling Device Apple
System
3.0 4.0 7.0

Wash Hold Send Peeled


Apple Apple Apple
Washed Apple Washed Apple Peeled Apple To
Processor Peeled Apple

5
26/04/2021

Context Diagram deployment to Data Flow


Diagram Level

6
26/04/2021

False Diagram True Diagram

Common Mistakes for DFD Depiction

7
26/04/2021

Common Modeling Rules


 All processes must have at least one data flow in and one
data flow out.
 All processes should modify the incoming data,
producing new forms of outgoing data.
 Each data store must be involved with at least one data
flow.
 Each external entity must be involved with at least one
data flow.
 A data flow must be attached to at least one process.

Rules Governing DFD Construction


• A process cannot have only outputs – “Miracle.”
• A process cannot have only inputs – “Black Hole.”
• The inputs to a process must be sufficient to produce the outputs from the process -
(Gray Hole).
• All data stores must be connected to at least one process.
• A data store cannot be connected to a source or sink.
• A data flow can have only one direction of flow. Multiple data flows to and/or from the
same process and data store must be shown by separate arrows.
• If the exact same data flows to two separate processes, it should be represented by a
forked arrow.
• Data cannot flow directly back into the process it has just left.
• All data flows must be named using a noun phrase.

8
26/04/2021

Context-Level/Level 0 Diagram

Employee Tax Form

Employee

0
Payroll Report

Time Sheet Employee


Payroll
System
Employee Payroll Check

Accounting
Department

Level-1 DFD
2.0
Employee Record Paycheck Data
Employee Compute Payroll
Employee S1 S2
Data File Weekly Data File
Paycheck
Payroll Record
Hours Worked

1.0 3.0
Employee Payroll Record
Time Sheet Create Prepare
Weekly Weekly
Payroll Employee Paycheck Payroll
Record Summary
Payroll Report
4.0

Prepare
Employee Tax Form Employee
Tax
Accounting
Form Department

9
26/04/2021

Level-2 DFD
Employee Record
S1 Employee Data File S2 Payroll Data File
Employee
Payroll Record
2.1 2.2 2.3
Hours Worked Gross Pay Net Pay
Compute Compute Create 3.1
Data Data
Gross Net Payroll Sort
1.0
Pay Pay Check Payroll
Create Records by
Weekly Employee
Time Sheet Payroll
Record Sorted Records

Employee Paycheck 3.2


Print
Weekly
4.2 4.1 Payroll
Summary
Print Calculate
Employee Payroll Employee Payroll Payroll Report
Employee Tax Form Payroll
Tax Deductions Record
Deductions
Form

Accounting
Department

Partial Level-n DFD

4.1.1
Employee
Payroll
Calculate Record

Payroll
Tax
Employee Tax Form
Deductions

Employee Data

4.2.2 4.2.1 4.1.3 4.1.2


Employee Employee Employee
Data Data Data
Print Calculate Calculate Calculate
Employee Employee Retirement Non-tax
Tax Form Vacation Allowance Deductions
Pay

10
26/04/2021

Structured English for Process 4.x


Process Structured English
ID

4.1.1 Multiply GROSS_PAY by FED_TAX_RATE and store in EMP_TAX_DEDUCT.

4.1.2 IF EMP_NONTAX_DEDUCT > 0


THEN append EMP_NONTAX_DEDUCT to employee data.

4.1.3 Multiply GROSS_PAY by .01 and store in EMP_RETIRE.

4.1.4 Multiply CURR_EMP_VACATION by EMP_DAY_RATE and store in


EMP_VACATION_PAY.

Creating Data Flow Diagrams


Steps:
1. Create a list of activities
2. Construct Context/Level 0 DFD
(identifies external entities and processes)
3. Construct Level 1 DFD
(identifies manageable sub process )
4. Construct Level 2- n DFD
(identifies actual data flows and data stores )
5. Check against rules of DFD

11
26/04/2021

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

12
26/04/2021

Creating Data Flow Diagrams


Example Steps:
The operations of a 1. Create a list of activities
simple lemonade stand
2. Construct Context Level DFD
will be used to
(identifies sources and sink)
demonstrate the creation
of dataflow diagrams. 3. 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 Customer Order


that take place at a lemonade Serve Product
stand. Collect Payment
Produce Product
Store Product

13
26/04/2021

Creating Data Flow Diagrams


Example 1. Create a list of activities
Customer Order
Also think of the additional
Serve Product
activities needed to support
Collect Payment
the basic activities.
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 Customer Order


some logical fashion, Serve Product
possibly functional areas. Collect Payment

Produce Product
Store Product

Order Raw Materials


Pay for Raw Materials

Pay for Labor

14
26/04/2021

Creating Data Flow Diagrams


Example 2. Construct Context Level DFD
Create a context level (identifies sources and sink)
diagram identifying the Context Level DFD
sources and sinks (users).
Sales Forecast
Customer Order Order 0.0
Serve Product CUSTOMER Lemonade Production Schedule EMPLOYEE
Product Served System Pay
Collect Payment Payment Time Worked
Received Goods
Produce Product Payment
Purchase Order
Store Product
VENDOR
Order Raw Materials
Pay for Raw Materials

Pay for Labor

Creating Data Flow Diagrams


Example 3. Construct Level 1 DFD
Create a level 1 diagram (identifies manageable sub processes )
identifying the logical Level 1 DFD
subsystems that may exist.
1.0
Sale
Customer Order Sales Forecast
Customer Order
Product Ordered
Serve Product
Payment
Collect Payment 2.0 Production
CUSTOMER EMPLOYEE
Production Schedule
Product Served
Produce Product
Received Goods Inventory
Store Product
3.0
VENDOR Procure- Order
Purchase Order
Order Raw Materials ment Decisions
Pay for Raw Materials Payment
Pay Time Worked

Pay for Labor 4.0


Payroll

15
26/04/2021

Creating Data Flow Diagrams


Example 4. Construct Level 2- n DFD
Create a level 2 (identifies actual data flows and data stores )
decomposing the processes Level 2 DFD
in level 1 and identifying
CUSTOMER
data stores.
Customer Order
ORDER
Request for Forecast
Customer Order
1.1
Serve Product Record
Collect Payment Order 1.3
Produce
Severed Order Sales
Produce Product Payment Forecast
Sales Forecast
Store Product
1.2
Receive PAYMENT
Payment
Order Raw Materials
Pay for Raw Materials

Pay for Labor

Creating Data Flow Diagrams


Example 4. Construct Level 2 (continued)
Create a level 2
decomposing the processes Level 2 DFD
in level 1 and identifying
Product Order
data stores.
ORDER
Customer Order 2.1
Serve Quantity Severed
Serve Product Product
Collect Payment RAW
Production
MATERIALS
Schedule
Produce Product 2.2
Store Product Produce Quantity Used
Product

INVENTORTY
Order Raw Materials Production Data
Pay for Raw Materials
2.3 Quantity Produced &
Store Location Stored
Pay for Labor Product

16
26/04/2021

Creating Data Flow Diagrams


Example 4. Construct Level 2 (continued)
Create a level 2
decomposing the processes Level 2 DFD
in level 1 and identifying Order Decision
PURCHASE
data stores. 3.1 ORDER
Produce
Purchase
Customer Order Order Quantity On-Hand
Serve Product RAW
Quantity 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 4. Construct Level 2 (continued)
Create a level 2
decomposing the processes Level 2 DFD
in level 1 and identifying Time Worked

data stores. 4.1 TIME CARDS


Record
Time
Customer Order Worked Employee ID
Serve Product EMPLOYEE
Collect Payment
Payroll Request
4.2
Produce Product Unpaid time cards
Calculate
Payroll
Store Product PAYROLL

Payment Approval
Order Raw Materials
4.3
Pay for Raw Materials Pay
Employe
e PAYMENTS
Pay for Labor
Payment

17
26/04/2021

Process Decomposition
1.1 1.2
1.0
Record Receive
Sale
Order Payment

2.1 2.2 2.3


2.0
Serve Produce Store
Production
Product Product Product

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

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

Context Level Level 1 Level 2

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.

18
26/04/2021

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

19
26/04/2021

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, System
parts cost
details
Mechanic

Accounting

20

You might also like