DATA FLOW DIAGRAM PART 2 Creating Data Flow

  • Slides: 25
Download presentation
DATA FLOW DIAGRAM PART 2

DATA FLOW DIAGRAM PART 2

Creating Data Flow Diagrams Creating DFDs is a highly iterative process of gradual refinement.

Creating Data Flow Diagrams Creating DFDs is a highly iterative process of gradual refinement. General steps: 1. Create a preliminary Context Diagram 2. Identify Use Cases, i. e. the ways in which users most commonly use the system 3. Create DFD fragments for each use case 4. Create a Level 0 diagram from fragments 5. Decompose to Level 1, 2, … 6. Go to step 1 and revise as necessary 7. Validate DFDs with users.

Context Diagram n n n Top-level view of IS A data flow diagram (DFD)

Context Diagram n n n Top-level view of IS A data flow diagram (DFD) of the scope of an organizational system that shows the system boundaries, external entities that interact with the system and the major information flows between the entities and the system Example: Order system that a company uses to enter orders and apply payments against a customer’s balance

DFD Rules—Context Diagram One process, numbered 0. n Sources and sinks (external entities) as

DFD Rules—Context Diagram One process, numbered 0. n Sources and sinks (external entities) as squares n Main data flows depicted n No internal data stores are shown n ¨ They are inside the system ¨ External data stores are shown as external entities ¨ How do you tell the difference between an internal and external data store?

Context Diagram of Order System

Context Diagram of Order System

Level-0 DFD n n Shows the system’s major processes, data flows, and data stores

Level-0 DFD n n Shows the system’s major processes, data flows, and data stores at a high level of abstraction When the Context Diagram is expanded into DFD level-0, all the connections that flow into and out of process 0 needs to be retained.

Context Diagram of Order System

Context Diagram of Order System

Level-0 DFD of Order System

Level-0 DFD of Order System

Lower-Level Diagrams Functional Decomposition n Balancing n

Lower-Level Diagrams Functional Decomposition n Balancing n

Decomposition of DFDs n Functional decomposition ¨ An iterative process of breaking a system

Decomposition of DFDs n Functional decomposition ¨ An iterative process of breaking a system description down into finer and finer detail ¨ Uses a series of increasingly detailed DFDs to describe an IS ¨ Act of going from one single system to many component processes ¨ Repetitive procedure ¨ Lowest level is called a primitive DFD n Level-N Diagrams ¨A DFD that is the result of n nested decompositions of a series of subprocesses from a process on a level-0 diagram

Balancing DFDs n n When decomposing a DFD, you must conserve inputs to and

Balancing DFDs n n When decomposing a DFD, you must conserve inputs to and outputs from a process at the next level of decomposition Ensures that the input and output data flows of the parent DFD are maintained on the child DFD This is called balancing Example: Hoosier Burgers ¨ In Figure 1, notice that there is one input to the system, the customer order ¨ Three outputs: n n n Customer receipt Food order Management reports

Figure 1 Context diagram of Hoosier Burger’s Food ordering system

Figure 1 Context diagram of Hoosier Burger’s Food ordering system

Balancing DFDs Example (Continued) Notice Figure 2. We have the same inputs and outputs

Balancing DFDs Example (Continued) Notice Figure 2. We have the same inputs and outputs n No new inputs or outputs have been introduced n We can say that the context diagram and level-0 DFD are balanced n

Figure 2 Level-0 DFD of Hoosier Burger’s food ordering system

Figure 2 Level-0 DFD of Hoosier Burger’s food ordering system

Balancing DFDs: An unbalanced example n Figure 3: ¨ In context diagram, we have

Balancing DFDs: An unbalanced example n Figure 3: ¨ In context diagram, we have one input to the system, A and one output, B ¨ Level-0 diagram has one additional data flow, C n These DFDs are not balanced

Figure 3: An unbalanced set of data flow diagrams 0 A B SINK SOURCE

Figure 3: An unbalanced set of data flow diagrams 0 A B SINK SOURCE (a) Context diagram A 1. 0 SOURCE 1 C SOURCE 2 2. 0 B SINK (b) Level-0 diagram

Balancing DFDs We can split a data flow into separate data flows on a

Balancing DFDs We can split a data flow into separate data flows on a lower level diagram (see Figure 4) n Balancing leads to four additional advanced rules n

Example of data flow splitting Payment & coupon Payment Coupon x. 0 Composite data

Example of data flow splitting Payment & coupon Payment Coupon x. 0 Composite data flow x. 1 x. 2 Disaggregated data flow

Advanced Rule for DFD n n A composite DF on 1 level can be

Advanced Rule for DFD n n A composite DF on 1 level can be split into component DF as the next level, but no new data can be added n all data in the composite must be accounted for in 1 or more subfollows The inputs to a process must b sufficient to produce the outputs from the process At the lowest level of DFD, new data flows may be added to represent data that r transmitted under exceptional condition, these data flows typically represent error message To avoid having data flow lines cross each other, u may repeat data strores or sources/sinks on a DFD. Use an additional symbol, like a double line on the middle vertical line of data strore symbol, or a diagonal line in a corner of a sink/source square to indicate a repeated symbol

Strategies for Developing DFDs n Top-down strategy ¨ Create the high-level diagrams (Context Diagram),

Strategies for Developing DFDs n Top-down strategy ¨ Create the high-level diagrams (Context Diagram), then low-level diagrams (Level-0 diagram), and so on n Bottom-up strategy ¨ Create the low-level diagrams, then higherlevel diagrams

Exercise: Precision Tools sells a line of high-quality woodworking tools. When customers place orders

Exercise: Precision Tools sells a line of high-quality woodworking tools. When customers place orders on the company’s Web site, the system checks to see if the items are in stock, issues a status message to the customer, and generates a shipping order to the warehouse, which fills the order. When the order is shipped, the customer is billed. The system also produces various reports, such as inventory reports for Accounting. n Draw a context diagram for the order system n Draw DFD diagram 0 for the order system

Identify Entities, Process, Data Stores & Data Flow n Entities Customer ¨ Warehouse ¨

Identify Entities, Process, Data Stores & Data Flow n Entities Customer ¨ Warehouse ¨ Accounting ¨ n Processes ¨ ¨ ¨ n 1. 0 Check Status 2. 0 Issue Status Messages 3. 0 Generate Shipping Order 4. 0 Manage Accounts Receivable 5. 0 Produce Reports Data Stores D 1 Pending Orders ¨ D 2 Accounts Receivable ¨ n Data Flows ¨ ¨ ¨ ¨ Order In-Stock Request 1. 0 Order Data Status Data 2. 0 Status Message Shipping Order 3. 0 Order Data Invoice Shipping Confirmation 4. 0 Payment Accounting Data Accounts Receivable Data 5. 0 Order Data Inventory Reports

Context Diagram of Order System

Context Diagram of Order System

Level-0 of Order System

Level-0 of Order System

HOMEWORK (group) n Based on the use cases, draw your project data flow in:

HOMEWORK (group) n Based on the use cases, draw your project data flow in: ¨ Context diagram ¨ Level 0 -DFD ¨ If neccesary, decompose the DFD to the next level DFDs ¨ Put them on your SRS’s document as the attachment