Chapter 7 Process Modeling and Data Flow Diagrams (DFD) Major Topics Process Modeling and Dataflow Diagrams (DFDs) 3 process modeling 3 data flow diagram symbols 3 data flow diagram levels 3 creating data flow diagrams Merrill Warkentin Mississippi State University 3 physical and logical DFDs 3 partitioning 3 (event driven modeling) 3 (use case and data flow diagrams) 2 © Merrill Warkentin, 2005 Process Modeling Data Flow Diagrams (DFD) 3 Graphically representing the functions, or processes, which capture, manipulate, store, and distribute data between a system and its environment and between components of a system 3 Data Flow Diagram (DFD) 3 graphical representation of data processes and flows throughout the organization 3 emphasizes logic of underlying system 3 based on general systems model Input 3 © Merrill Warkentin, 2005 4 Output © Merrill Warkentin, 2005 Advantages of DFD Why Use DFD? 3 early understanding of system technical implications 3 logical information flow of the system 3 determination of physical system construction requirements 3 establishment of inter-relatedness between business and systems 3 simplicity of notation 3 user involvement with system development 3 establishment of manual and automated systems requirements 5 Process 3 determine if data and processes have been defined properly © Merrill Warkentin, 2005 6 Copyright 2005, Merrill Warkentin © Merrill Warkentin, 2005 page 1 Chapter 7 Process Modeling and Data Flow Diagrams (DFD) DFD - Four Symbols DFD - Four Symbols 3 Process - work or actions performed on data so that they are transformed, stored, or distributed 3 Date Store - data at rest, notebook, file folder, database 3 Source/Sink - origin and/or destination of the data (external entities) 3 Data flow - data in motion 7 © Merrill Warkentin, 2005 8 © Merrill Warkentin, 2005 DFD Formatting Symbols Entity 3 supply data to the system 3 external to boundaries of system Entity External Entities 2 sources and destinations of data 3 receive data/information from the system 3 data movement Data Flow 2.1 Process 2 electronic exchange 2 paper documents (sometimes shown as) 3 but not considered part of the system 3 transformation of data 2 from input to output 2.1 3 data depository for D3 Data Store 9 Entity 2 electronic files 2 paper files (sometimes shown as)© Merrill Warkentin, 2005 Purchase order Enter Process orders 10 © Merrill Warkentin, 2005 2.1 Data Flows Process 3 represent data being moved to or from Processes 3 set of tasks performed on data to convert inputs to outputs 2 an external entity 2 a process 2 a data store 3 labeled as a verb/noun 2 e.g., ENTER ORDERS 3 shown as a line with arrowheads 3 labeled with description of the type of data, document, or report 3 data flow out always labeled differently than data flow in 2.1 2.1 Enter Process orders 11 Order data D3 Entity Data Open order file Store © Merrill Warkentin, 2005 Purchase order 12 Copyright 2005, Merrill Warkentin Enter Process orders Order data D3 Data Open order file Store © Merrill Warkentin, 2005 page 2 Chapter 7 Process Modeling and Data Flow Diagrams (DFD) Processes - 4 Types D3 3 3 3 3 3 3 3 create new data 3 change quality but not content of input 2 e.g., verify customer number 2 output = input = (verified) customer number 3 reorganize input Data Store Data Stores data at rest corresponds to data files or tables can be electronic or paper files shown as a rectangle (electronic) arrow into file means data written arrow out means data read 2.1 1.0 2 sort 2 reformat 2 filter/select Enter Process orders Order data 3 convey input without any change Orders D1 13 D3 © Merrill Warkentin, 2005 14 Data Customer data Store Data Open order file Store D2 Data PO File Store © Merrill Warkentin, 2005 Balancing DFDs Five guidelines for drawing DFDs 3 Inputs and outputs must be conserved between levels of DFDs 3 Level n & n+1 must have the same inputs and outputs 3 Completeness - all necessary components are included and described 3 Consistency - information on one level is included on other levels 3 Timing - a DFD does NOT indicate when the system is flowing 3 Iterative development - it may take 3 or more DFDs to get it right 3 Primitive DFDs (the lowest level DFD) - stop decomposing when the lowest logical level is reached 15 © Merrill Warkentin, 2005 16 Problems with DFDs © Merrill Warkentin, 2005 Describe problems (handout) 3 Identify problems on the DFD (see handout) 17 © Merrill Warkentin, 2005 18 Copyright 2005, Merrill Warkentin © Merrill Warkentin, 2005 page 3 Chapter 7 Process Modeling and Data Flow Diagrams (DFD) DFD Development/Levels DFD Organization 3 context diagram External Entity 1 2 general highest level diagram 2 one process representing entire system Input A 1.0 Name Processof System External Entity 2 External Entity 3 Output C Input B 3 diagram 0 2 exploded view of the entire system 2 up to nine processes 2 all external entities and data stores 1.0 External Entity 1 Record A D1 2 exploded view of each individual process 2 outlined in Diagram 0 19 © Merrill Warkentin, 2005 Output C External Entity 3 Record E Data Store 1 D2 Data Store 2 Record A Record E 2.0 3.0 Record E 3.1 Data Flow D External Entity 2 Input B Process B Data Flow D Detailed Process C-A 3.2 Record 1 D5 Record Store 1 Record 1 Detailed Process C-B Process C 20 Creating the Context Diagram © Merrill Warkentin, 2005 Context Diagram Example 3 highest level 3 contains only one process 21 © Merrill Warkentin, 2005 22 © Merrill Warkentin, 2005 Drawing Diagram 0 Drawing Diagram 0 3 explode context diagram 3 start with data flow from an external entity 3 work backwards from an output data flow 3 examine data flow 3 analyze well defined process 3 take note of problem areas 2 more detail 2 close-ups of processes 2 data stores 2 lower-level data flows 3 may include up to 9 processes 23 4.0 Process D Data Flow B Data Flow C 3 child diagrams 3 original should be an overview 2 basic inputs 2 general system 2 outputs Process A Input A © Merrill Warkentin, 2005 24 Copyright 2005, Merrill Warkentin © Merrill Warkentin, 2005 page 4 Chapter 7 Process Modeling and Data Flow Diagrams (DFD) Creating Child Diagrams Diagram 0 Example 3 more detailed levels 2 each process exploded further 3 parent process 2 exploded diagram 0 process 3 child diagram 2 resulting diagram 2 entities usually not shown at this level 2 may have error lines here only 25 © Merrill Warkentin, 2005 26 Child Diagram Examples 27 © Merrill Warkentin, 2005 Child Diagram Examples © Merrill Warkentin, 2005 28 © Merrill Warkentin, 2005 Rules & Guidelines for DFD Child Diagram Examples A data store must always be connected to a process. 2.1 This: D3 Not this: D3 Nor this: 29 © Merrill Warkentin, 2005 30 Copyright 2005, Merrill Warkentin Data Store Data Store Entity Data Flow Data Flow Data Flow Process D4 D4 Data Store Data Store © Merrill Warkentin, 2005 page 5 Chapter 7 Process Modeling and Data Flow Diagrams (DFD) Rules & Guidelines for DFD Naming Rules for Data Flows External entity must always be connected to a process. 3 data flows must be named 2 use a NOUN (what data are being used by a process?) 2.1 OK - Entity Data Flow Process 3 output flow from a process not OK - Entity 2 must have a different name than the input flow 2 output cannot be the same as the input Data Flow Data Store D4 Data may flow out of one process and into another. OK - Process 3 data traveling together 2.2 2.1 Data Flow 31 Process © Merrill Warkentin, 2005 32 Rules & Guidelines for Processes 3 if no input data flowing to them, may not be properly represented 3 process performs one simple, well-defined task, activity or function 3 must have at least one input and one output data flow 3 should be uniquely numbered on the flow diagram 3 description of the data attributes should be contained in a similarly numbered table structure / data attribute dictionary 2 if no input, process is creating output from “thin air” (where is the data to be processed into output coming from? 2 if no output, process is “black hole” or “data sink” (why is data flowing to a process that does not produce any output?) 2 you can create the dictionary by printing out the ACCESS data structures for each table 35 © Merrill Warkentin, 2005 Data Stores’ Rules & Guidelines 2 where did the data in the data store come from? 33 2 should be shown and named as one data flow 2 example: orders and payments flowing together should be labeled as “orders and payments” © Merrill Warkentin, 2005 34 3 data should be sent only to processes that use them © Merrill Warkentin, 2005 Rules & Guidelines for Processes Common Errors 3 should be uniquely named and numbered 3 not including data flow 3 description of the process should be in a similarly numbered and indexed “process dictionary” 3 placing arrowhead in the wrong direction 3 data store to can be the only receiver of output from a process 3 labeling incorrectly 3 data store to can be the only source of input to a process 3 omitting data flow © Merrill Warkentin, 2005 3 directly connecting data stores & external entities 3 including more than 9 processes 3 having unbalanced composition 36 Copyright 2005, Merrill Warkentin © Merrill Warkentin, 2005 page 6 Chapter 7 Process Modeling and Data Flow Diagrams (DFD) Illegal Data Flows Common DFD Errors Dual/Split Data Flows Entity to Entity/Data Store Communication illegal data flows B1 2.1 2.1 Entity corrected data flows No Data Output B2 B1 a process is needed to exchange data flows between boundaries B1 a process is needed to update (or use) a data store DS1 a process is needed to present data from a data store DS1 a process is needed to move data from one data store to another Entity B1 Process Process Entity D3 Data Store B1 No Data Input DS1 Data to Data Communication DS1 B1 2.1 Process D3 Data Store D3 Data Store DS1 37 © Merrill Warkentin, 2005 38 Practice Question - THINK B1 DS2 © Merrill Warkentin, 2005 DFD for Hoosier Burger (food ordering system) Which is an error condition? 39 DS2 DS1 Context diagram - highest view of the system © Merrill Warkentin, 2005 40 DFD for Hoosier Burger (food ordering system) © Merrill Warkentin, 2005 DFD for Hoosier Burger (food ordering system) Level-1 - decomposes process 1.0 from level-0 Level-0 DFD systems major processes, data flows, and data stores Level-n DFD n nested decompositions of sub-processes from the level-0 diagram 41 © Merrill Warkentin, 2005 42 Copyright 2005, Merrill Warkentin © Merrill Warkentin, 2005 page 7 Chapter 7 Process Modeling and Data Flow Diagrams (DFD) DFD for Hoosier Burger (food ordering system) DFD for Hoosier Burger (food ordering system) Level-1 - decomposes process 4.0 from level-0 Level-2 Diagram Showing the Decomposition of Process 4.3 from the Level-1 Diagram for Process 4.0 43 © Merrill Warkentin, 2005 44 © Merrill Warkentin, 2005 Logical DFD Physical DFD 3 focus on how the business operates 3 processes that exist regardless of the type of system implemented 3 details physical system requirements 3 contains construction specifications (software, hardware, people) 45 © Merrill Warkentin, 2005 46 Logical to Physical DFD © Merrill Warkentin, 2005 Logical to Physical DFD 3 create a logical DFD of the current system 3 add all data and processes not in the current system which must be present in the new system 3 derive the physical data flow diagram for the new system 3 logical DFD of the current system will lead to appropriate logical DFD of the new system 3 physical DFD will follow naturally if the logical DFD is accurate 47 © Merrill Warkentin, 2005 48 Copyright 2005, Merrill Warkentin © Merrill Warkentin, 2005 page 8 Chapter 7 Process Modeling and Data Flow Diagrams (DFD) Logical DFD - Advantages Physical DFD - Advantages 3 better communication 3 clarifying manual & automated processes 3 detailed process description 3 more stable systems 3 sequencing processes 3 better understanding 3 identifying temporary data stores 3 flexibility and maintenance 3 specifying name of files and printouts 3 elimination of redundancies 3 adding controls 49 © Merrill Warkentin, 2005 50 Partitioning Data Flow Diagrams © Merrill Warkentin, 2005 Reasons for Partitioning The process of separating activities into groups based on automation, manual, and user needs 3 different user groups 3 timing 3 identify separate user groups 3 process timing 3 similar task 3 efficiency 3 data consistency 3 security 51 3 similar tasks 3 efficiency 3 consistency 3 security © Merrill Warkentin, 2005 52 Indicate with dotted line Partitioning the DFD 53 © Merrill Warkentin, 2005 Look . . . © Merrill Warkentin, 2005 54 Copyright 2005, Merrill Warkentin © Merrill Warkentin, 2005 page 9 Chapter 7 Process Modeling and Data Flow Diagrams (DFD) Separate batch programs Practice Question - THINK Which of the following is NOT a reason for partitioning processes into separate programs? 55 © Merrill Warkentin, 2005 56 © Merrill Warkentin, 2005 Summary 3 standard communication tool for design team 3 promotes better understanding of system Copyright Notice This document may not, in whole or part, be copied, photocopied, reproduced, translated, transmitted, or reduced to any electronic medium or machine readable form without explicit permission and written authorization from Dr. Merrill Warkentin. 3 ensures that all components are included 3 leads to effective logical design mwarkentin@acm.org http://www.MISProfessor.com 57 © Merrill Warkentin, 2005 Copyright 2005, Merrill Warkentin page 10