1. 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
2. DFD for 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
3. Context-Level Diagram
Employee Tax Form
Employee
0
Payroll Report
Time Sheet Employee
Payroll
System
Employee Payroll Check
Accounting
Department
4. Level-0 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
5. Level-1 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
6. 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
7. 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. ANSI Flowchart Symbology
Punch Card Tape Sor
Program
File t
Source
Library Document
Program
Disk File
Manual Multiple
Documents Extrac
Oper. t
Merg
Decisio Database e
Termination
n
9. System Flowchart
Order-
Entry
Dept.
Correc
Member t
Orders Order
Errors
Member
Input Order Error
Member Report
Orders
Member Order Sorted
Edit Valid Sort Member
Member
Program Orders by # Orders
Orders
10. Functional Primitive
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
12. Decision Tree Example
Driver Accident Driver Driver’s College H.S. Surcharge
Age Free Gender Educ. Educ. GPA
3.25+ 7%
6
Yes 10%
< 3.25
5
Yes No 12%
4
15%
M No
3 10%
Yes
< 25 yrs. F
2 20%
Surcharge 1
No
Rating 7%
2
25 yrs. +
Yes 0%
13. State-Transition Diagram
S1. ON button
Pushed
S2. OFF button
State 1. Idle pushed 2. Operating
State State
S4. Minor
Error
S5. Major S3. Error
Cleared
Error Condition
Cleared Detected
Error
Transition State
15. 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.