Ch6.ppt - IS225 System Analysis & Design I

advertisement
Chapter 6
Structuring System
Requirements:
Process Modeling
Learning Objectives
Understand the logical modeling of
processes through studying data flow
diagrams
 How to draw data flow diagrams using
rules and guidelines
 How to decompose data flow diagrams
into lower-level diagrams
 Balancing of data flow diagrams

2
Learning Objectives (Cont.)
Explain the differences among four types
of DFDs: current physical, current logical,
new physical, and new logical.
 Discuss process modeling for electronic
commerce applications.

3
Process Modeling
4
Structuring System
Requirements

Modeling a system’s process

The two sub-phases of the analysis phase of the SDLC


Requirement determination
Requirements structuring
In the requirement structuring phase, the SA must
 organize and utilize the information gathered during
requirements determination into a meaningful representation of
the IS that exists (Process Modeling)
 Model the processing logic and the timing of the events (logic
Modeling).
 Structure of the data within the system (Data Modeling)
5
Traditional vs. Object-Oriented Approaches
6
Requirements for the Traditional and OO Approaches
7
Process Modeling
Graphically represent the functions or
processes that capture, manipulate, store
and distribute data between a system and
its environment and among system
components
 A common form of process model is Data
flow diagram (DFD)

8
Process Modeling

Data flow diagrams enable us to model

how data flows through an information
system (i.e. between external entities and the
processes and data stores within a system),
 the relationship among data flows, and
 how data is stored at specific locations.
 the processes that change or transform data.
9
Process Modeling

As data flow diagrams concentrate on the
movement of data between processes,
these diagrams are called process
models.
10
Process Modeling

Deliverables and Outcomes
 Context data flow diagram (DFD)
 Scope of the system, indicating which elements are inside
and outside the system.
 DFDs
of current physical system (Adequate detail
only)
 DFDs of current logical system



Technology-independent DFD
Shows what data processing functions are performed by the
current information system.
Enables analysts to understand current system
8.11
11
Process Modeling

Deliverables and outcomes (continued)
 DFDs
of new logical system
Technology independent
 Show data flows, structure and functional
requirements of new system

8.12
12
Data Flow Diagramming
Mechanics
DFDs are versatile diagramming tools.
 Four symbols are used to represent both
physical and logical IS.

 Two
different standard sets can be used
DeMarco and Yourdan
 Gane and Sarson

8.13
13
Definitions and Symbols
14
Data Flow Diagramming
Mechanics

Data Flow





Represent data in motion and moving from one place to another in
the system.
A data flow is data that move together. It can be composed of many
individual pieces of data that are generated at the same time and
flow together to common destinations.
Drawn as an arrow
Select a meaningful name to represent the data
Example:




Data on a customer order form or a payroll check.
The results of a query to a database.
The contents of a printed report
Data on a data entry computer display form.
15
Data Flow Diagramming
Mechanics

Data Store


Represent data at rest
May represent one or many different physical locations for data
e.g.





File folder
Computer-based file(s)
Notebook
Represented by a rectangle with a vertical line on the left side. At
the left end, the number for the data store is written. At the right
side, a meaningful label for the data store is written.
Examples :

Data about the customers, students, customer orders, or suppliers
invoices, roster of classes
16
Data Flow Diagramming
Mechanics

Process




Represent work or action performed on data so that they are
transformed, stored or distributed
Represented by a rectangle with rounded corners, and a line
drawn through the top. The upper portion is used to indicate the
number of process, and the lower portion indicates the name for
the process.
When modeling data processing of a system, it doesn’t matter
whether a process is performed manually or by a computer.
Examples:



Generate paycheck
Calculate overtime pay
Compute grade point average
17
Data Flow Diagramming
Mechanics

Source/Sink
 Represent
the origin and/or destination of the
data i.e. Source which produces data or Sink
which consumes or accepts data. Sometimes
referred to as an external entity, as they are
outside the system.
 Drawn as a square symbol
 Name states what the external agent is
18
Data Flow Diagramming
Mechanics (Source/Sink)
 Because
they are external to the Information system,
many characteristics are not of interest to us
 Examples of sources or sinks are as:



A person inside or outside the business units supported by
the system the SA is analyzing and who interacts with the
system e.g. customer
Another information system with which the system (the SA is
analyzing) exchanges information e.g. instructor information
system and student information system
Another Organization that sends data to or receives
information from the system ( the SA is analyzing) e.g. book
supplier and the university.
19
Do not consider the following
characteristics of sources and sinks
When drawing Data Flow Diagrams, do not show
 Direct Interactions that occur between source and sinks.
 How information is used in the Source or Sink ( i.e. show
a source or sink a black box)
 How to control or redesigning a source or sink from the
perspective of the information system.
 Sources or Sink directly accessing stored data since
external agents cannot directly manipulate data stored
within the system i.e. processes within the system must
receive or distribute data between the system and its
environment.
20
Example :
Hoosier Burger’s Customer Order System


Hoosier Burger uses an information system
known as customer order information system
which is used to
 take Customer order from the Customer.
and gives
 the Food order to the kitchen,
 the Receipt is to the Customer
 Management Reports to the Restaurant
Manager
Draw the highest level Data flow Diagram i.e.
context diagram
21
Data Flow Diagramming Definitions

Context Diagram
A
data flow diagram (DFD) of the scope of an
Information system that shows the



Whole system boundaries,
external entities that interact with the system and
major data flows between the external entities and the
system
 Highest level view of
 The context diagram
the system
contains only one process
labeled as “0” representing the entire system.
 The
data stores of the system are
conceptually inside the one process, no
data stores appear on a context diagram.
 The
sources/sinks represent its environment
22
Context Diagram
23
Context
Diagram
for RMO
Customer
Support
System
24
Data Flow Diagramming Definitions
Level-0 Diagram (Diagram after the Context diagram)

Next step is to expand the context diagram to
show the breakdown of processes
A
data flow diagram (DFD) that represents a



system’s major individual processes (functions),
data flows and
data stores at a high level of detail
 Each process has a number that ends
 Capturing data from different sources
in .0
 Maintaining data stores
 Producing and distributing data to different sinks
 High level descriptions of data transformation
operations.
25
DFD Fragment Showing Use Case Look Up
Item Availability from the RMO
26
DFD Integrates Event Table and ERD
27
Developing DFDs: An Example

The system begins by receiving and
transform the customer order ( name the
process as 1.0) and outputs four data flows.
1.
2.
3.
4.
Food order send to the kitchen.
goods sold data.
inventory data
a receipt given to the customer.
28
Developing DFDs: An
Example



Goods sold data obtained from process 1.0 is used to
update the Goods Sold File by adding the new good
sold data obtained in process 1.0 (Name the process
as P2.0 and the data file as D2) .
Inventory data obtained from process 1.0 is used to
update the Inventory File by deducting the inventory
data (no. of items from the item stock) from the
inventory file( Name the process as P3.0 and the data
store as D1)
The Management reports are produced by reading
the information from the updated D1 and D2 i.e. daily
goods amount sold file and inventory data file ( Name
the process as P4.0). These Management reports are
given to the Restaurant Manager
29
Figure 7-5
Level-0 DFD of Hoosier Burger’s food ordering system
30
Data Flow Diagramming Rules

There are two DFD guidelines that apply:
 The
inputs to a process are different from the
outputs of that process.

Processes purpose is to transform inputs into
outputs.
 Objects

on a DFD have unique names.
Every process has a unique name.
Data Flow Diagramming Rules
32
Decomposition of DFDs

Functional decomposition is an iterative
process of breaking a system description
down into finer and finer detail.
 Creates
a set of charts in which one process
on a given chart is explained in greater detail
on another chart.
 Continues until no subprocess can logically
be broken down any further.
33
Decomposition of DFDs (Cont.)
Primitive DFD is the lowest level of a DFD.
 Level-1 diagram results from
decomposition of Level-0 diagram.
 Level-n diagram is a DFD diagram that is
the result of a n nested decompositions
from a process on a level-0 diagram.

34
Decomposition of level-0 DFD of Hoosier Burger
System
Level -1 Data flow Diagram
 The first process 1.0 called Receive and Transform
Customer Food order is decomposed into five 5 logically
separate processes or functions. They are







Receive customer order ( P 1.1)
Transform the order into a kitchen format used for the kitchen
(P1.2)
Transform the order into a printed receipt for the customer (
P1.3)
Transform the order into goods sold data ( P1.4)
Transform the order into inventory data ( P1.5)
No source and sinks are represented are not shown in
level -1 DFD.
Decomposing Process 1.0, 2.0 or 3.0 or 4.0 would create
level-1 diagram.
35
Level - 1
36
Decomposition of level-0 DFD of Hoosier
Burger System



Process 2.0 and Process 3.0 use data input to update
data stores. Since updating a data store is a singular
logical function , neither of the processes need to be
decomposed further.
Each level-1, -2 or –n DFD represents one process on a
level-(n-1) DFD. Each DFD should be on a separate
page.
Process 4.0 (Produce Management reports) can be
decomposed into three sub-processes.



Access Goods Sold and Inventory data (P 4.1)
Aggregate Goods Sold Inventory Data ( P 4.2)
Prepare Management Reports ( P 4.3)
37
Level-1 DFD
Level-1 DFD shows
the sub-processes
of one of the
processes in the
Level-0 DFD.
This is a Level-1
DFD for Process
4.0.
Processes are labeled 4.1, 4.2, etc. These can be further
decomposed in more primitive (lower-level) DFDs if necessary.
38
Decomposition of level-1 DFD of Hoosier
Burger System

Process 4.3 should be further
decomposed into sub processes
 Format
Management Reports (P 4.3.1)
 Print Management Reports ( P 4.3.2)
39
Level-2 DFD
Level-n DFD shows
the sub-processes
of one of the
processes in the
Level n-1 DFD.
This is a Level-2
DFD for Process
4.3.
Processes are labeled 4.3.1, 4.3.2, etc. If this is the
lowest level of the hierarchy, it is called a primitive DFD.
40
Layers of
DFD
Abstraction
for Course
Registration
System
41
DFD Fragments

Created for each use case in the event table

Represent system response to one event
within a single process symbol

Self-contained models

Focus attention on single part of system

Show only data stores required in the use
case
42
Three Separate DFD Fragments for Course
Registration System
43
Balancing DFDs



When decomposing a DFD, you must conserve inputs to
and outputs from a process at the next level of
decomposition
This is called balancing
Example: Hoosier Burgers


In Figure 7-4, notice that there is one input to the system, the
customer order
Three outputs:



Customer receipt
Food order
Management reports
8.44
44
Balancing DFDs

Example (Continued)
 Notice
Figure 7-5. We have the same inputs
and outputs
 No new inputs or outputs have been
introduced
 We can say that the context diagram and
level-0 DFD are balanced
8.45
45
Balancing DFDs




Notice Fig 7-7, where Process 1.0 from the
level-0 DFD has been decomposed. Process 1.0
has one input and four outputs.
The inputs and outputs in level-1 diagram are
the same.
No new inputs and outputs have been added.
Compare Process 4.0 in fig 7-5 to its
decomposition in fig 7-8, the inputs and outputs
are the same.
46
Balancing DFDs (Cont.)
 Balanced
means:
Number
of inputs to lower level DFD
equals number of inputs to associated
process of higher-level DFD
Number of outputs to lower level DFD
equals number of outputs to associated
process of higher-level DFD
47
Balancing DFDs (Cont.)
1 input
1 output
2 inputs
1 output
48
Balancing DFDs
The DFDs are balanced when we split a
data flow going to a process into separate
data flows going to two processes (see
Figure 7-11). These diagrams are still
balanced since exactly the same data are
included in each diagram.
 Balancing leads to four additional
advanced rules (See Table 8-3)

8.49
49
Advanced Rules governing data
flow diagrams



A composite data flow on one level can be split into
component data flows at the next level, but no new data
can be added.
The inputs to a process must be sufficient to produce the
output from the process.
To avoid having data flow lines cross each other, repeat
data stores or source/sinks on a DFD. Use an additional
symbol, like a double line on the middle vertical line of a
data store symbol, or a diagonal line in a corner of a
sink/source square
50
Balancing DFDs (Cont.)
© 2008 by Prentice Hall
51
Four Different Types of DFDs

Current Physical
 Process
labels identify technology (people or
systems) used to process the data.
 Data flows and data stores identify actual name of the
physical media.

Current Logical
 Physical
aspects of system are removed as much as
possible.
 Current system is reduced to data and processes that
transform them.
52
Four Different Types of DFDs
(Cont.)

New Logical
 Includes
additional functions.
 Obsolete functions are removed.
 Inefficient data flows are reorganized.

New Physical
 Represents
the physical implementation of
the new system.
53
Physical
DFD for
Scheduling
Courses
54
Evaluating DFD Quality
Readable
 Internally consistent and balanced
 Accurately represents system requirements
 Reduces information overload – rule of 7
+/- 2

 Single
DFD should not have more than 7 +/-2
processes
 No more than 7 +/- 2 data flows should enter or
leave a process or data store in a single DFD

Minimizes required number of interfaces
55
Data Flow Consistency
Problems

Differences in data flow content between a
process and its process decomposition

Data outflows without corresponding
inflows

Data inflows without corresponding
outflows

Results in unbalanced DFDs
56
Consistency Rules

All data that flows into a process must
 Flow
out of the process, or
 Be
used to generate data that flows out of the
process

All data that flows out of a process must
 Have
flowed into the process, or
 Have
been generated from data that flowed
into the process
57
Unnecessary Data Input: Black
Hole
58
Process with Impossible Data
Output: a Miracle
59
Process with Unnecessary Data
Input
60
Process with Impossible Data
Output
61

Rules for stopping decomposition
 When each process has been
reduced to a single decision, single
calculation or single database
operation
 When each data store represents
data about a single entity, such as a
customer, employee, product or
order.
 When the system user does not care
to see any more detail
62

Rules for stopping decomposition (continued)
 When
the analyst have documented sufficient
detail to do subsequent systems development
task.
 When every data flow does not need to be split
further to show that data are handled in various
ways
 When you believe that you have shown each
business form or transaction, on-line display and
report as a single data flow
 When you believe that there is a separate
process for each choice on all lowest-level menu
options
63
Documentation of DFD
Components

Lowest-level processes need to be described
in detail

Data flow contents need to be described

Data stores need to be described in terms of
data elements

Each data element needs to be described

Various options for process definition exist
64
Structured English

Method of writing process specifications

Combines structured programming
techniques with narrative English

Well-suited for lengthy sequential
processes or simple control logic (single
loop or if-then-else)

Ill-suited for complex decision logic or few
(or no) sequential processing steps
65
Structured English Example
66
Process 2.1 and Structured English Process
Description
67
Decision Tables and Decision
Trees

Can summarize complex decision
logic better than structured English

Incorporate logic into the table or tree
structure to make descriptions more
readable
68
Decision Table for Calculating
Shipping Charges
69
Decision Tree for Calculating
Shipping Charges
70
Data Flow Definitions

Textual description of data flow’s content
and internal structure

Often coincide with attributes of data
entities included in ERD plus computed
values

Algebraic notion describes data elements
on data flow plus data structure
71
Summary

In this chapter you learned how to:
 Understand
logical process modeling via
data flow diagrams (DFDs).
 Draw data flow diagrams of well structured
process models.
 Decompose data flow diagrams into lowerlevel diagrams.
72
Summary (Cont.)
 Balance
high-level and low-level data flow
diagrams.
 Explain differences between current
physical, current logical, new physical, and
new logical data flow diagrams.
 Use data flow diagrams for analyzing
information systems.
73
Download