Вы находитесь на странице: 1из 33

MCN7102 SOFTWARE ENGINEERING By Lumala Namulindwa Agnes Freda Lecture 5 (Data-oriented Design:Data flow Diagrams )

Acknowledgement

These slides are based on material by Yale Braunstein, Sommerville 7ed, Pressman 8th ed, SWEBOK 04, SR Schach 5ed. They are also based on material from various online sources like wikiversity and others which I don't quite remember. I thank all the educators who prepare very good material without which these slides would be incomplete.

Key Definitions

Data flow diagramming shows business processes and the data that flows between them

A DFD is a process model

DFD Elements

Reading a DFD

Key Definition

Decomposition is the process of modeling the system and its components in increasing levels of detail. Balancing involves ensuring that information presented at one level of a DFD is accurately represented in the next level DFD.

Context Diagram

Shows the context into which the business process fits Shows the overall business process as just one process Shows all the outside entities that receive information from or contribute information to the system

Relationship Among DFD levels

Decomposition Diagram

Level 0 Diagram

Shows all the processes that comprise the overall system Shows how information moves from and to each process Adds data stores

10

Level 1 Diagrams

Shows all the processes that comprise a single process on the level 0 diagram Shows how information moves from and to each of these processes Shows in more detail the content of higher level process Level 1 diagrams may not be needed for all level 0 processes

11

Level 2 Diagrams

Shows all processes that comprise a single process on the level 1 diagram Shows how information moves from and to each of these processes Level 2 diagrams may not be needed for all level 1 processes Correctly numbering each process helps the user understand where the process fits into the overall system
12

Data Flow Splits and Joins


A data flow split shows where a flow is broken into its component parts for use in separate processes Data flow splits need not be mutually exclusive nor use all the data from the parent flow As we move to lower levels we become more precise about the data flows A data flow join shows where components are merged to describe a more comprehensive flow

13

Alternative Data Flows

Where a process can produce different data given different conditions We show both data flows and use the process description to explain why there are alternatives Tip -- alternative data flows often accompany processes with IF statements

14

Integrating Scenario Descriptions

DFDs generally integrate scenario descriptions Names of use cases become processes Names of inputs and outputs become data flows Combining small data inputs and outputs into a single flow

15

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

16

Creating DFDs
Define Entities

External entities represent persons, processes or machines which produce data to be used by the system or receive data that is output by the system Examples: Student, Customer, Client
Define Processes

Student

2.1 Create Student Record

Processes are discrete actions that transform input data to output data Examples: Create Student Record, Calculate Purchase Cost, Register Client

17

Creating DFDs (contd)


Define Data Stores
Data stores are temporary or permanent repositories of information that are inputs to or outputs of processes Examples: Student Master, Client List

D3

Student Master

Define Data Flows


Data flows represent the transfer of data over time from one place (entity, process, data store) to another Examples: New Student Information (from Student, to Student Master) New Student Information

18

Creating DFDs (contd)


Define the System
A system is the collection of all business processes which perform tasks or produce outputs we care about. It is what happens. The system is a single process, connected to external entities Represented in a Context Diagram

Define Subsystems
A subsystem gives a more detailed view individual processes contained in the context diagram Includes data stores, more elementary processes

19

DFDs Created by Top-Down Analysis

Create a narrative: description of system Create a Context Diagram that contains a single process (the system) and all entities which share data with the system Explode the parent context diagram to produce a Diagram 0 (child) DFD Create Diagram 1, 2, , n DFDs that represent explosions of Diagram 0, 1, , n-1 DFDs until a diagram has only primitive processes Create process descriptions to be implemented by application programs: queries, macros, reports, programming languages

Narrative Context Diagram Diagram 0 DFD

Diagram 1 DFDs

Diagram n DFDs

E-R Diagram

Process Descriptions 20

DFD Fragment Tips


All process names must be verb phrases Maintain organizations viewpoint in naming processes Layouts often place processes in the center inputs from the left outputs to the right stores beneath the processes

21

A DFD Fragment Example

22

DFD Common Errors


Black Hole Gray Hole

Miracle
23

A Second DFD Fragment Example

24

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

25

Composite & Elementary Flows

26

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 dont need lower level More than seven processes become overly complex and difficult to read

27

Flows to & from Data Stores

28

Illegal Data Flows

29

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
30

DFD Example: Bus Garage Repairs


Buses come to a garage for repairs. A mechanic and helper perform the repair, record the reason for the repair and record the total cost of all parts used on a Shop Repair Order. Information on labor, parts and repair outcome is used for billing by the Accounting Department, parts monitoring by the inventory management computer system and a performance review by the supervisor. Key process (the system): performing repairs and storing information related to repairs External Entities: Bus, Mechanic, Helper, Supervisor, Inventory Management System, Accounting Department, etc. Processes:

Record Bus ID and reason for repair Determine parts needed Perform repair Calculate parts extended and total cost Record labor hours, cost
31

DFD Example: Bus Garage Repairs (contd)

Data stores:

Personnel file Repairs file Bus master list Parts list Repair order Bus record Parts record Employee timecard Invoices

Data flows:

32

Bus Garage Context Diagram


Bus
Mechanical problem to be repaired Fixed mechanical problems

Helper

0
Labor

Repair summary List of parts used

Supervisor

Bus Repair Process


Labor

Mechanic

Labor, parts cost details

Inventory Management System

Accounting
33

Вам также может понравиться