Data Flow Modelling Concepts Data Flow Diagrams External Entities, Data Stores, Processes and Data Flows Elementary Process Descriptions Levelling Document Flow Diagrams Key Definitions A process model is a formal way of representing how a business operates Data flow diagramming shows business processes and the data that flows between them Sample 1 Sample 2 Key Definitions Logical process models describe processes without suggesting how they are conducted Physical models include information about how the processes are implemented e Manager External Entities P.O. Data Flow Diagrams aid communication Purchase Order 1 Stock List Stock Clerk Order Stock M2 Stock List Stock File d Processes Supplier Data Stores Purchase Order Delivery 2 Stock Clerk Receive Stock e Orders Delivered Goods 3 Cashier Sell Stock Sold Goods * Customer Purchase Order Cabinet * Matched Orders Manager a M1 Bought Goods M2 Stock File Data Flow Diagrams DFD Notation The DFD is a diagram that consists principally of four symbols, namely the external entity, the data flow, the process and the data store Additionally, a physical flow can be shown on the DFD of the current system Data Flow Diagrams External Entities d Supplier Data Flow Diagrams Data Flows Data Flow (usual) Customer Details Bi-directional Flow (rare) Flow Between External Entities (for convenience) Resource Flow (for convenience) Goods Cosmetics Data Flow Diagrams Process 3 Cashier Sell Stock Data Flow Diagrams Data Stores Digitised D3 Manual M1 T1 Transient Duplicate D1 Orders Suppliers Stock File Unpaid Invoices D1 Orders e Manager Data Flow Diagrams Decomposition Purchase Order 1 Stock List Stock Clerk Order Stock P.O. M2 Stock List Stock File d Supplier Purchase Order Delivery 2 Stock Clerk Receive Stock e Orders Delivered Goods 3 Cashier Sell Stock Sold Goods * Customer Purchase Order Cabinet * Matched Orders Manager a M1 Bought Goods M2 Stock File Data Flow Diagrams Decomposing Data Flow Diagrams Any process on a DFD may be broken up into several sub-processes which, when viewed collectively, make up that process Thus for example we may break-up process 1 of the Small Stock System into that shown on the next slide: Data Flow Diagrams Decomposing Data Flow Diagrams e Manager 1 Order Stock Stock List 1.1 1.2 Produce Stock List Stock List M2 Purchase Order Stock File Record Purchase Order * * Purchase Order M1 Purchase Order Cabinet Data Flow Diagrams Decomposing Data Flow Diagrams The decomposition of a DFD into lower level DFDs is known as levelling The DFD that shows the entire system is known as the ‘top level’ or ‘level 1’ DFD The DFDs that contain more detailed views of the level 1 processes make up ‘level 2’ DFDs Any level 2 process that is further decomposed gives rise to a level 3 DFD and so on Data Flow Diagrams Decomposing Data Flow Diagrams Elementary Process Description System: Small Stock DFD Type: Current Process Name: Record Purchase Order Process Id: 1.2 Managers give the stock clerk a ready-made purchase order. The stock clerk places this order in the Purchase Order Cabinet. It is the managers’ responsibility to send the order directly to the supplier they have chosen. Each purchase order contains product information taken from the supplier’s price list. The date after which a delivery of goods will be unacceptable is also included. Data Flow Diagrams Decomposing Data Flow Diagrams 1.2 Record Purchase Order * Data Flow Diagrams Context Diagrams Data Flow Stock List Purchase Order Data Item product name quantity in stock supplier name supplier address supplier’s product code product name quantity ordered purchase order date latest acceptable delivery date Remarks Purchase order contains one ‘supplier name’ but many ‘product name’ Data Flow Diagrams Starting from the Context Diagram To develop a Context Diagram we carry out the following tasks: (i) Identify all sources and recipients of data from the system, i.e. external entities (ii) Identify the major data flows to and from the external entities (iii)Convert each source or recipient into an external entity symbol (iv)Add the data flows between each external entity and a single box representing the entire system Data Flow Diagrams Starting from the Context Diagram External Entity Supplier Purchaser Customer Sales & Marketing Accounts S or R s r s s s r r s r r Data Flow Delivery Note Purchase Order Delivery Details Invoice P.O. Quantities Stock Report Dispatch Note Customer Order Matched C.O. #1 Matched Invoices Data Flow Diagrams Starting from the Context Diagram a Supplier Payment Delivery Note Purchase Order Delivery Details e Matched Invoice Accounts Invoice ZigZag Warehouse System Stock Report d Despatch Note Matched C.O. Copy #1 Customer Customer Order P.O.Quantities b Purchaser Customer Order c Sales and Marketing Document Flow Diagrams i. Identify all recipients and sources of documents, whether inside or outside the system boundary ii. Identify the documents that connect them iii. Convert each source and recipient into an external entity symbol iv. Add data flow arrows to represent each connecting document v. Add the system boundary to exclude the external entities identified in the context diagram Document Flow Diagrams Source Supplier Supplier Stock Clerk Stock Clerk Despatch Clerk Customer Sales & Marketing Despatch Clerk Despatch Super. Despatch Clerk …. Document Invoice Delivery Times Stock Report Stock Report Despatch Note Customer Order Customer Order Despatch Report Matched Dsp Rep Matched CO #1 Recipient P.O.Clerk Stock Clerk Purchaser Despatch Supervisor Customer Sales & Marketing Despatch Clerk Despatch Supervisor Despatch Clerk Sales & Marketing Document Flow Diagrams Despatch Supervisor Sales and Marketing Matched Despatch Rpt Customer Order Despatch Report Matched C.O. Copy #1 Despatch Clerk Data Flow Diagrams Converting Document Flow Diagrams To transform the Document Flow Diagram into a DFD we follow each document flow in turn, asking the following questions: What process generates this document flow? What process receives this document flow? Is the document stored by a process? Where is the document stored? Is the document created from stored data? What business activity triggers the process? Is the document a source of new data? Data Flow Diagrams Context Diagrams A level higher than level 1, showing the whole system as a single process with external entities around it, is also possible: e P.O. Manager Stock List Purchase Order Matched Orders d Small Stock System Bought Goods a Customer Delivery Supplier Data Flow Diagrams Decomposing Data Flow Diagrams Decomposition Diagram Data Flow Diagrams Starting from the Context Diagram We can now follow each flow into and identify the elementary process responsible for it A grouping of these elementary processes can then give us a first glimpse of the system’s Data Flow Model Data Flow Diagrams Converting Business Activity Models Check Delivery 2 Goods Receiving b Supplier Check Delivery Delivery Note Place Goods in Delivery Dock P.O. Copy M1 Matched P.O. Purchase Orders Allocate Stock Location T2 Matched P.O.’s Matched P.O. Remove Goods from Delivery Dock M2 Stock New Stock 3 Stock Keeping Store Stock Store Goods in Depot Data Flow Diagrams Tips For a process to be complete, it needs to have both an input and an output (shown by data flows going into and coming out of it) 2 Goods Receiving Check Delivery 2 T2 Matched P.O.’s T2 Matched P.O.’s Matched P.O. Goods Receiving b Supplier Check Delivery Delivery Note 2 Goods Receiving b Supplier Delivery Note Check Delivery Matched P.O. Data Flow Diagrams Tips f M2 Someone A data store Something WHY? 2 f Someone Something Do something with it M2 Same something A data store Creating Use Cases Elements of a Use Case Trigger -- event that causes the scenario to begin External trigger Temporal trigger All possible inputs and outputs Individual steps Show sequential order Show conditional steps Scenario Template (Use Case) Scenario Description Scenario Name: Short Description: ID Number: _ __ Trigger: _______________________________________________________________ Type: External / Temporal Major Inputs: Description ________________________ ________________________ ________________________ ________________________ ________________________ ________________________ Major Steps Performed Major Outputs: Source ___________ ___________ ___________ ___________ ___________ ___________ Description Destination _______________________ _______________________ _______________________ _______________________ _______________________ ____________ ____________ ____________ ____________ ____________ Information for Steps Creating Data Flow Diagrams Steps in Building DFDs Build the context diagram Create DFD fragments for each scenario Organize DFD fragments into level 0 Decompose level 0 DFDs as needed Validate DFDs with user A DFD Fragment Example DFD – Common Errors Error Error Error DFD – Packet Concept Telephone Service Provider Item ized calls & invoice Incorrect use of the packet concept Item ized calls Invoice 1 Pay phone bill Correct use of the packet concept A Second DFD Fragment Example Level 0 Tips Generally move from top to bottom, left to right Minimize crossed lines Iterate as needed The DFD is often drawn many times before it is finished, even with very experienced systems analysts Composite & Elementary Flows Tips for Level 1 and Below Sources for inputs and outputs listed at higher level List source and destination of data flows to processes and stores within each DFD Depth of DFD depends on overall system complexity Two processes generally don’t need lower level More than seven processes become overly complex and difficult to read Flows to & from Data Stores Illegal Data Flows Validating the DFD Syntax errors Assure correct DFD structure Semantics errors Assure accuracy of DFD relative to actual/desired business processes User walkthroughs Role-play processes Examine lowest level DFDs Examine names carefully How should we gather requirements? Use cases? 1. Use cases hold functional requirements in an easy-to-read text format 2. They make a good framework for nonfunctional requirements & project details. 3. Use cases show only the Functional req’ts. 4. Design is not done only in use case units. Use cases do not collect formulae, state, cardinality, performance, uptime, ... Examples: 1. Order cost = order item costs * 1.06 tax 2. Promotions may not run longer than 6 months. 3. Customers only become Preferred after ... 4. A customer has one and only one sales contact. 5. Response time is ... 6. Uptime requirement is ... 7. Number of simultaneous users will be ... Use the scenarios directly to Design and Test the system. What if...? Scenarios “Knows how to...” “Knows how to...” “Knows how to...” Summary The Data Flow Diagram (DFD) is an essential tool for creating formal descriptions of business processes and data flows. Use cases record the input, transformation, and output of business processes. Eliciting scenario descriptions and modeling business processes are critically important skills for the systems analyst to master.