CSE104 - Information s 1 Process Modelling Data Flow Diagrams Process Modelling Process modelling aims to graphically represent the processes which capture, manipulate, store and distribute data. data flow diagrams function decomposition structured English decision tables and decision trees Data flow Diagrams Data flow diagrams model the flow of data into, through, and out of an information system: show the processes that change or transform data show the movement of data between processes represent a system as a network of processes which transform data flowing between them
Example DFD DFDs fit neatly onto a single page the user is not overwhelmed by a DFD invalid orders ORDERS CUSTOMERS shipping details WAREHOUSE order details books orders 1. RECEIVE ORDER customer name, customer address. SHIP BOOKS billing information CUSTOMERS customer name, customer address books INVOICES customer name, invoice details 3. COLLECT PAYMENTS invoices, statements CUSTOMERS payments, enquiries Data Flow Diagrams Data flow diagrams (or DFDs): a well-known process modelling technique easily understood a good communication tool model both manual and automated processes Components of a DFD 1. Process calculate price. Data flow loan application 3. Data store Products 4. External agent (Source/Sink) Suppliers
1. Process transforms incoming data flows into outgoing flows: the work performed on data which changes it data each process has a unique number and name calculate price 1. Process name each process using a verb and a noun phrase eg. calculate price check customer details accept supplier delivery the name of a process should describe what the process does avoid vague names where possible e.g. "process data". Data Flow a data flow represents data in motion, moving from one place in the system to another describes a "packet" of data or data that moves together: a data flow may consist of many individual, related pieces of data that move together to a common destination loan application
name each data flow using a noun or noun phrase eg. customer order the name of a data flow should describe the contents of the data "packet" the name should include as much information as possible about the data flow eg."customer payment" rather than just "payment" customer order validate customer order valid customer order invalid customer order 3. Data Store a data store represents a collection of data flows "at rest" each data store has a unique name the name should describe the contents of the data store a data store may represent many different types of physical locations of data a data store may be a temporary or a permanent repository of data The Data Store different notations
data flows to and from a data store can remain unlabelled if all attributes in the store are moving, i.e. if an entire data packet (or packets) is going into or out of the data store sales order check sales order Sales orders 3 produce weekly sales totals weekly sales totals 4. External Agent (Source/Sink) an external agent represents an entity with which the system communicates and which is outside the scope of the system eg. an outside organisation or individual, another department or another system, a person or group within the department supported by the system who interacts with the system an external agent is a source if it is an origin of data coming into the system an external agent is a sink if it is a destination of data leaving the system Suppliers 4. External Agent (Source/Sink) data flows connecting the external agents to the processes within the system represent the interface between the system and its environment external agents are outside the system and define its boundaries an external agent may be both a source and a sink what a sink does with data it receives from the system and how a source produces data which it inputs to the system are outside the boundary of the system and are not shown on the data flow diagram
Example DFD Sales Order sales order purchase order Suppliers goods returned goods unavailable notice Inventory supplier delivery Warehouse shipping slip checked supplier invoice Accounts Department Example Data Flow Diagram Customers sales order 1 check sales order Suppliers Sales orders produce purchase order purchase order Guidelines for Drawing DFDs each object on a data flow diagram must have a unique name each process must have at least one data flow coming in (input) and at least one data flow going out (output) the inputs to a process are different from the outputs of that process a process must be able to build its outputs using only the information in its input data flows plus any constant information
Guidelines for Drawing DFDs data flows are permitted: between processes from a data store to a process from a process to a data store from a source to a process from a process to a sink Guidelines for Drawing DFDs data flows are NOT permitted: between external agents between data stores from an external agent to a data store Identify six errors in this abstract DFD EE1 Data Store Data store 1 1 process EE Process1 EE3
Levelling Data Flow Diagrams Any "real" system is too large to represent as a single data flow diagram the solution is to decompose the system into a hierarchy of levels of processing the process model of the system then consists of a set of levelled data flow diagrams levelling of DFDs improves their readability and usefulness as a communication tool Levelling of DFDs Levelling creates a hierarchical decomposition of the processing within the system Context diagram Level 0 diagram Level 1 diagrams Level diagrams... Level n diagrams Levelling of DFDs Context diagram Level 0 diagram 1 3 4 Level 1 diagrams 1.1 1. 1.3.1. 3.1 3. 4.1 4. 4.3 Level diagrams 1.1.1 1.1. 3..1 3..
Context Diagram the highest level data flow diagram is the context diagram the context diagram shows the interaction of the system with its environment in terms of data flows the context diagram defines the boundary of the system (the scope of the system) only the data flows which leave the system and the data flows wh ich come from outside the system are shown Context Diagram the entire system is represented as a single process all external agents (sources and sinks) are shown no data stores are shown: they are inside the boundary of the sy stem EASY GO HOTEL Example Context Diagram Sales Order sales order purchase order Suppliers goods returned goods unavailable notice Inventory supplier delivery Warehouse shipping slip checked supplier invoice Accounts Department
Level Zero Diagram the level zero data flow diagram is the diagram at the level immediately below the context diagram it "expands" the single process on the context diagram to show the major, high-level processes (or functions) within the system 1.0 4.0.0 3.0 Level Zero Diagram all external agents (sources and sinks) are included because the level zero diagram, like the context diagram, represents the entiresystem the number of each process ends in.0 which corresponds to the level of the diagram: e.g. 1.0,.0, 3.0 etc. often just 1,, 3 etc. are used Example Level Zero Diagram Order Entry out of stock notice sales order 1.0 Fill Sales Orders.0 Monitor Stock levels Stock file purchase order 3.0 Accept Deliveries Suppliers supplier delivery Warehouse shipping slip checked supplier invoice Accounts Department
Level 1 and lower level diagrams each Level 1 diagram and diagrams at lower levels (e.g. Level, Level 3) show only a part of the processing Level 1 processes are numbered 1.1, 1., 1.3, and.1,.,.3 etc that part is shown in more detail than on the Level zero diagram no external agents are shown on a Level 1 or lower diagrams, as the entire system is not being represented Level 1 diagrams a set of data flow diagrams is created at Level 1 there is one Level 1 diagram for each of the processes at Level zero each diagram decomposes a Level zero process into several processes.1.3.4.5. Levelling DFDs 1 Context diagram 3 Level zero diagram 3.1.1 3. Diagram 3 (level 1) Further diagrams or process descriptions. Diagram 3 (level 1)
Example Level zero diagram CUSTOMERS Customer details Product details qty holding customer invoice 1 Record and Invoice Sales INVENTORY holding order qty SALES ORDERS p.o. number delivered qty order qty Maintain Product Inventory SUPPLIERS order qty p.o. invoice delivery qty Example Level 1 diagram Customer details Product details qty 1.1 Check Customer Credit customer credit status 1.3 Record Sales Demand qty SALES ORDERS 1. INVENTORY Check Stock Available holding available qty 1.4 Create Sales Invoice INVOICES customer invoice Guidelines for Levelling DFDs numbering: when a process is decomposed, its diagram is given the same number as that process balancing of DFDs: all data flows entering and leaving a process must appear on the corresponding diagram which decomposes that process external agents: are only included on the two diagrams which represent the entire system, i.e. the context and level zero diagrams
Guidelines for Levelling DFDs balancing data flows: if data flows are decomposed at lower levels then the contents of the data flows across levels must be balanced out of stock notice 1 Fill Sales Orders sales order shipping slip customer shipping details 1.1 Check shipping details customer order items 1. Check stock available sales order = customer + customer order shipping details items Guidelines for Levelling DFDs The access to data stores across levels of diagrams must be consistent: the direction of accesses must match and all accesses on higher level diagrams must appear on corresponding lower level diagrams a data store is first shown on the highest level diagram where i t is accessed by more than one process it can then appear on all lower level diagrams where it is accessed 1 1.1 1. 1.3 Guidelines for Levelling DFDs partition processes to: form cohesive, related groups of activities minimise the data flows between them all parts of the system need not be decomposed to the same level
Guidelines for Levelling DFDs How many levels should be in a set of DFDs? each diagram usually has between 3 and 7 processes level the diagrams until bottom level or primitive processes are reached primitive processes cannot be further decomposed as a data flow diagram An example - Context Diagram Applicant Line Manager Address Applicant name Position Spec Position Acknowledgement Employment Successful Applicant Decision Position Payroll An example - Level zero diagram Applicant Position Address 1 Accept Application Acknowledgement Applicant name Ackn d Appn Position Spec Evaluate Applicants Decision Position Line Manager Applicant Unsuccessfuls file Evaluation results Successful Applicant Payroll
Level 1- Diagram 1 Address Applicant name Position 1.1 Verified Application Acknowledgement 1. Verify for Completeness Acknowledge Application Acknowledged Application Level 1 - Diagram Ackn d Appn Position Spec.1 Screen Applicants unqualified applicant Qualified applicant..3 Decision Reject Unsuitabl es Schedule Evaluation Decision Unsuccessfuls file Evaluation results Successful Applicant References WHITTEN, J.L., BENTLEY, L.D. and DITTMAN, K.C. (001) 5th ed., s Analysis and Design Methods, Irwin/McGraw-HilI, New York, NY. Chapters 8 HOFFER, J.A., GEORGE, J.F. and VALACICH (005) 4th ed., Modern s Analysis and Design, Benjamin/Cummings, Massachusetts. Chapter 7