DFD Symbology DeMarco-Yourdon Symbology Gane-Sarson Symbology Examples Process Data Store Entity Data Flow 6.1 Create Employee Payroll Check Customer New Customer Information Inventory File D7
DFD for Peeling an Apple 1.0 Get Apple Apple Storage S1 Peeling Device Storage S2 2.0 Get Peeling Device 4.0 Hold Apple 3.0 Wash Apple 6.0 Discard Peel 5.0 Peel Apple With Peeling Device 7.0 Send Peeled Apple To Processor Peel Disposal S2 Processed Apple System Unwashed Apple Unwashed Apple Washed Apple Washed Apple Peeling Device Peeling Device Apple Peel Apple Peel Peeled Apple Peeled Apple
Context-Level Diagram Employee Accounting Department 0 Employee Payroll System Employee Tax Form Payroll Report Time Sheet Employee Payroll Check
Level-0 DFD 1.0 Create Weekly Payroll Record Employee Data File S1 Employee Payroll Data File S2 2.0 Compute Weekly Paycheck 3.0 Prepare Weekly Payroll Summary 4.0 Prepare Employee Tax Form Accounting Department Employee Record Paycheck Data Payroll Record Payroll Report Employee Paycheck Employee Tax Form Time Sheet Hours Worked Employee Payroll Record
Level-1 DFD Employee Accounting Department 1.0 Create Weekly Payroll Record Employee Data File S1 Employee Tax Form Payroll Data File S2 2.1 Compute Gross Pay 2.3 Create Payroll Check 2.2 Compute Net Pay 3.2 Print Weekly Payroll Summary 3.1 Sort Payroll Records by Employee 4.2 Print Employee Tax Form 4.1 Calculate Payroll Deductions Employee Paycheck Payroll Deductions Employee Payroll Record Time Sheet Employee Record Gross Pay Data Net Pay Data Hours Worked Payroll Record Sorted Records Payroll Report
Partial Level-n DFD 4.1.2 Calculate Non-tax Deductions 4.1.3 Calculate Retirement Allowance 4.2.1 Calculate Employee Vacation Pay 4.1.1 Calculate Payroll Tax Deductions 4.2.2 Print Employee Tax Form Employee Data Employee Data Employee Data Employee Tax Form Employee Payroll Record Employee Data
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.
ANSI Flowchart Symbology Program Library Program Manual Oper. Punch Card Source Document Multiple Documents Tape File Disk File Database Sort Extract Merge Decision Termination
System Flowchart Order-Entry Dept. Member Orders Input Member Orders Member Orders Member Order Edit Program Valid Orders Sort by # Sorted Member Orders Member Order Error Report Correct Order Errors
Functional Primitive 4.1.2 Calculate Non-tax Deductions 4.1.3 Calculate Retirement Allowance 4.2.1 Calculate Employee Vacation Pay 4.1.1 Calculate Payroll Tax Deductions 4.2.2 Print Employee Tax Form Employee Data Employee Data Employee Data Employee Tax Form Employee Payroll Record Employee Data
Decision Tree Example Surcharge Rating < 25 yrs. No 25 yrs. + Yes 1 2 2 10% 20% 7% 0% Yes 3 4 5 6 F M 15% 12% 10% 7% No Yes No Yes < 3.25 3.25+ Driver Age Accident Free Driver Gender Driver’s Educ. College Educ. H.S. GPA Surcharge
State-Transition Diagram State Transition Error State 2. Operating State 1. Idle State S5. Major Error Cleared S1. ON button Pushed S3. Error Condition Detected S2. OFF button pushed S4. Minor Error Cleared
Structured English for Process 4.x Process ID Structured English 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 .