ppt

advertisement
Chapter 8
Structuring system requirements:
process modeling
Three views for structuring
data requirements
• Process view:
– the sequence of data movement and handling operations within
the system (chapter 8)  process modelling
• Logic and timing view:
– the rules by which data are transformed and manipulated and an
indication of what triggers data transformation (chapter 9 &
12) Logic modelling
• Data view:
– the inherent structure of data independent of how or where it is
processed (chapter 10) Data modelling
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
• Logical process models describe processes without suggesting how
they are conducted
• Physical models include information about how the processes are
implemented
Objectives
• Understand the logical of processes modeling through
studying examples such as data flow diagrams (DFD)
• Learn basic mechanisms of drawing and revising data
flow diagram (DFD)
• Use flow diagrams as tools to support the analysis of
information
Modelling for three main reasons
1. Facilitate understanding a system
2. Process modelling involves graphical representation of function
and processes which capture, manipulate, store and distribute data
between a system and its environment, and between component
within a system
3. It supports communication with a systems analysts, end-users,
and other roles
Reading a DFD
DFD Elements
DFD Shapes from Visio
Visio 2000
Visio 5.x
From Flow Chart /
Data Flow Diagram
From Software Diagram /
Gane-Sarson DFD
From Flow Chart /
Data Flow Diagram
ID #
Process
Process
Process
Data Store
Data Store
1
Data Store
ID
#
External Entity
External
Entity
External
Entity
DFD – Practical Example
Launched Dec. 11, 1998, the Climate Orbiter plunged too steeply
into the Martian atmosphere Sept. 23, 1999, and either burned up
or crashed. In an initial failure report released Oct. 15, 2000 the
review board blamed the navigation error on a communications
foul-up between NASA's Jet Propulsion Laboratory and prime
contractor Lockheed Martin.
Who was
responsible
for this task?
Transfer of Flight Control Data
This process
was missing
JPL-1
?
?
LM-1
Collect,
analyze,
generate flight
control data
Transfer data
Convert data
from Metric to
English
Control
spaceflight
Metric data
J1
JPL store
English data
LM1
LM store
Data Flow Diagram (DFD)
• DFD is one of several notations that are called structured analysis
technique
• It is a graphical tool that allows analyst-users to depict the flow of
data in an IS
• It concentrates on the movement of data between processes
• DFD evolves four symbols for process modelling
–
–
–
–
Data flows
Data stores
Process
Source / sink
Data flows
– They are groups of data that move and flow through a system
from one place to another.
– Include names of all individual elements of data moving
– Data flow is represented by “arrow”
• E.g. results of grading mark
Current score
Final score
Final grades
Data stores
– They refer to data at rest that may represent one or many
physical locations.
– Each data store has a label and number (number of files
location)
– Data store is represented by a rectangle
• E.g. data about students (paper-based or floppy disk)
D1
Class/
grad file
Processes
– They are the action performed on data so that they are
transformed (manual or automatic), stored or distributed
• E.g. calculate class mark
– Each process includes a name & process number
– It is represented by rectangle with rounded corners
1.0
Calculate
Class Grad
Sources / sinks
– They are the origin (sources) and/or destinations (sink) of the
data, i.e. that supplies or receive data
– They refer to external entities (or outside) to a system;
boundaries of the system; boundaries
– Each source/ sink has a name that states what the external agent
is, e.g. students
– A source (sink) is represented by square
Teacher
Example of Data Flow Diagram
Student
Current
grade
Test scores
1.0
Calculate
Class Grad
Register’s
office
Final grades
Current score
2.0
Teacher
Final score
Final grades
Save Open
D1
Calculate
University Grad
Save Open
Class/
grad file
D2
Process
Source / sink
Data stores (files)
Data flow
Student
files
Items not considered in DFD
–
–
–
–
Interaction between source (sink)
Actions of source (sink) are black box
How to redesign or control the source (sink)
How to provide source (sink) direct access to data,
Clarification of the concept source (sink)
– Any organisation unit or other organisation which send or
receive data (information) from the system you are analysing
(e.g. supplier)
– A person inside or outside the business supported by the system
(e.g. customer)
– Another system with which the system, you are analysing,
exchanges data (information)
Context diagram of DFD
Final grades
Student
Register’s
office
Test scores
Final grades
Grading
system
Final
score
Current score
Teacher
Context diagram is an overview of an organisational system
that show the system boundaries, external entities that
interact with the system, and the major information flows
between the entities and the system
Level-0 diagram
• DFD could have many levels diagrams: level-0, level-1, etc.
• Level-0 diagram is a data flow diagram that represents a system’s major
processes, data flows, and data stores at a high level of detail.
• Level-n A DFD that is the result of n nested decomposition of a series of sub
processes from a process on a level 0 diagram
– Example of level-0 diagram
Current
grade
Test scores
1.0
Calculate
Class Grad
Save Open
Class/
D1 grad file
Register’s
office
Final grades
Student
Current score
Teacher
Final score
Final grades
2.0
Calculate
University
Grad
Save Open
Student
D2 files
Context diagram of MacDonald food ordering
system
Customer
Kitchen
Customer order
0
Receipt
Food ordering
system
Management
report
Restaurant
manager
Food order
Level-0 diagram
• Exercise in the classroom
– Generate the level-0 diagram by detailing the main process
– Food ordering system (process 0) could be split into three sub processes
•
•
•
•
Receive and transform customer food order
Update good sold file
Update inventory file
Produce management report
Rules of DFD / decomposition of process 4.0
• Functional decomposition is an iterative processes of breaking the
description of a system down into finer and finer details which
creates a set of charts in which one process in a given chart is
explained in greater details on another chart
Daily inventory amount
Daily inventory amount
Daily
Good sold
amounts
4.0
Produce
management
report
4.1
Daily
Goods
Sold
amounts
Access good
sold & inventory
data
Inventory
data
Good sold
data
4.2
Aggregate
good sold &
inventory data
Aggregate data
4.3
Management report
Prepare
Management report
management
report
Rules of DFD / balancing
• Balancing is the conservation of inputs and outputs to a DFD
process when that process is decomposed to lower levels
Which of the two diagrams is balanced or
unbalanced?
Daily inventory amount
Daily inventory amount
Daily
Good sold
amounts
4.0
Daily
Goods
Sold
amounts
Produce report
4.1
Access data
Inventory
data
Good sold
data
Aggregate data
Management report
A
B
4.2
Aggregate data
4.3
Prepare report
Management report
Daily inventory amount
Daily
Good sold
amounts
4.1
4.0
Produce report
Daily
Goods
Sold
amounts
Access data
Inventory
data
Good sold
data
4.2
Aggregate data
Aggregate data
Management report
4.3
Prepare report
Management report
A DFD Fragment Example
A Second DFD Fragment Example
Four types of DFD used in system development
• Current physical
– Processes label include the name of people and technology used to process
data
– Data flow and data store include the name of actual physical media in which
data flow or in which data are stored (file location, PCs, etc.)
• Current logical
– Physical model is reduced to only essential part, i.e. reduced to data &
processes that transform them (what and how)
• New logical
– Models is the same as current logical model if users were happy about current
functionality of the system (there were errors during implementation)
– Others, new logical models include new functions according to users’ wishes
• New physical
– Reflect decisions about which functions to automate or to leave manually
Output/deliverable of process modeling
Input
Information gathered from: interview, questionnaire, JAD sessions, etc.
Process
Modeling
Output (DFDs)
Context Data Flow Diagram
DFD of current physical system
DFD of current Logical system (technology impendent)
DFD of new logical system
Description of each DFD components
Using DFD in the analysis process &
guideline
• Correctness
• Completeness
• Inconsistency
• Timing
• Primitive DFD
Correctness and Completeness
• Correctness: it refers to drawing a correct DFD (see rules e.g.
balancing, functional decomposition)
• Completeness: it refers to whether you have included in your
DFDs all the components necessary for the system you are
modeling.
– Examples of completeness
• There are entities that are not connected to any thing else
• There is a process with only input and without output
Example of completeness: where is the error?
Customer
Kitchen
1.0
Receive & transform
customer food order
2.0
Inventory
sold
Good sold
3.0
Update good
sold file
Update
inventory file
Format data
Format data
Good sold file
Daily good
sold amount
4.0
Produce
management
report
Daily inventory
amount
Inventory file
Consistency
• Consistency: it refers to whether or not the depiction of the system
shown in at one level of a nested set of DFD is compatible with the
depiction of the system shown in at other level
– Example of inconsistencies
• Existing of a level-1 diagram with no high level -0 diagram
• Existing of a data flow at level-0 diagram but not at level-1 diagram
Example of inconsistencies: where is the error?
(already seen)
Level-1 diagram
Level-0 diagram
Daily inventory amount
Daily
Good sold
amounts
Daily inventory amount
4.1
4.0
Produce report
Management report
Daily
Goods
Sold
amounts
Access data
Inventory
data
Good sold
data
4.2
Aggregate data
Aggregate data
4.3
Prepare report
Management report
Other guidelines
• DFD does not show timing, draw diagrams as if the system has never started
and will never stop
• Iterative development: DFD recognize that system requirement determination &
structuring are interacting
• Primitive DFD: it refers to the lowest level of DFD decomposition. When does
a DFD decomposing stop?
• Very important idea: there is no good or bad modelling!!!
• Drawing DFD is facilitated by CASE upper tools (generating processes and
diagrams)
• DFD can be used as an analysing tool to check correctness, inconsistencies and
completeness
• DFD can be used as a tool to support Business Process Re-engineering (BPR)
– Example of CASE tool, developed in SIMNET, used to generate processes (different
from DFD)
– It consists to generate processes manually and the system converts the process into a
coding system
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
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
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
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
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 they are
alternatives
Tip -- alternative data flows often accompany processes with IF statements
Your Turn
•
•
•
At this point in the process it is easy to lose track of the “big picture”.
Describe the difference between data flows, data stores, and processes.
Describe in your own words the relationship between the DFD and the ultimate new
application being developed.
Download