0% found this document useful (0 votes)
21 views

REQ - Lecture 5

This document discusses data flow diagrams (DFDs), including their purpose, notation, rules, and how to develop DFDs through decomposition and balancing lower-level diagrams. DFDs are used to model systems from a functional perspective by depicting the flow of data between processes and data stores.

Uploaded by

Nhung Trang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

REQ - Lecture 5

This document discusses data flow diagrams (DFDs), including their purpose, notation, rules, and how to develop DFDs through decomposition and balancing lower-level diagrams. DFDs are used to model systems from a functional perspective by depicting the flow of data between processes and data stores.

Uploaded by

Nhung Trang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

61FIT3REQ – Software Requirements Analysis

Lecture 5

Data Flow Diagram

Faculty of Information Technology


Hanoi University
Three Perspectives of Requirements
• Data perspective
– Data and program structure
– Dependencies and relationships of data and program
components
• Functional perspective
– The transformations from information/data into
information/data
– Control Flows
• Behavioral perspective
– How system states change in response to triggers
Three Perspectives of Requirements
Data Flow Diagram Overview
• A DFD depicts:
– The system inputs and outputs at a high level of
abstraction
– The collections (storage) of data or physical
materials that the system manipulates
– The flows of data or material between processes,
stores, and the outside world
• DFDs are created in different levels of details,
starting at level-0.
How does DFD differ?
• DFD is a specific way to do requirements
modeling from the functional perspective.
Flowchart Activity Diagram Data Flow Diagram
• Low-level flow of • Flow of control • Flow of data
control • Does not indicate
• Without • With swimlanes the order or
swimlanes sequence of
• Simpler than • More complex activities
Activity Diagram than Flowchart
• Good for • Good for business
programs & processes &
algorithms systems
Data Flow Diagramming Mechanics
• Represent both physical and logical
information systems
• Only four symbols are used
• Useful for depicting information flows
DFD notations

diagrams.net symbols
DFD Symbols
• Process: work or actions
performed on data (inside the
system)

• Data store: data at rest (inside


the system)
DFD Symbols
• Source/sink: external entity
that is the origin or destination
of data (outside the system)

• Data flow: arrows depicting


movement of data
Explanation of DFD symbols
• A data flow is best understood as data in motion,
moving from one place in a system to another.
• A data store is data at rest.
• Sources/sinks are outside the system.
– a source/sink is the origin and/or destination of the
data.
• A process is the work or actions performed on
data so that they are transformed, stored, or
distributed.
– In DFD, it does not matter whether a process is
performed manually or by a computer.
Context diagram
• Context diagram is an overview of an
organizational system that shows:
– the system boundaries
– external entities that interact with the system
– major information flows between the entities and
the system
• Note: only one process symbol, and no data
stores shown
Context diagram
• Context diagram is useful to illustrate the
project scope.
• Besides context diagram, the Use case
diagram and the Feature tree are also used to
represent project scope.
Context diagram of some food-ordering system
Developing DFDs
• 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
abstraction.
– Processes are labeled 1.0, 2.0, etc. These will be
decomposed into more primitive (lower-level)
DFDs.
Level-0 DFD of a food-ordering system
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.
Process Rules
A. No process can have only outputs. It would
be making data from nothing. If an object has
only outputs, then it must be a source.
B. No process can have only inputs (a black
hole). If an object has only inputs, then it
must be a sink.
C. A process has a verb phrase label.
Data Store Rules
D. Data cannot move directly from one data store
to another data store. Data must be moved by a
process.
E. Data cannot move directly from an outside
source to a data store. Data must be moved by a
process that receives data from the source and
places the data into the data store.
F. Data cannot move directly to an outside sink
from a data store. Data must be moved by a
process.
G. A data store has a noun phrase label.
Source & Sink
H. Data cannot move directly from a source to a
sink. It must be moved by a process if the
data are of any concern to our system.
H. Otherwise, the data flow is not shown on the
DFD.
I. A source/sink has a noun phrase label.
Data Flow Rules
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 sub-process can logically be
broken down any further.
Decomposition of DFDs
• Level-1 diagram results from decomposition
of Level-0 diagram.
• Level-n diagram is a DFD diagram that is the
result of n nested decompositions from a
process on a level-0 diagram.

• Primitive DFD is the lowest (most detailed)


level of a DFD.
Level-1 DFD
Level-1 DFD for Process
4.0 in the Level-0 DFD.

Processes are labeled 4.1, 4.2, etc.


These can be further decomposed
into lower-level DFDs if needed.
Level-n DFD

Level-2 DFD for Process 4.3.

Level-n DFD shows the sub-processes of one of the


processes in the Level n-1 DFD.
Balancing DFDs
• Conservation Principle: conserve inputs and
outputs to a process at the next level of
decomposition.

• Balancing: conservation of inputs and outputs


to a data flow diagram process when that
process is decomposed to a lower level.
Balancing DFDs
• 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
Example: A set of DFDs which are unbalanced
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.
Four Different Types of DFDs
• New Logical
– Includes additional functions
– Obsolete functions are removed.
– Inefficient data flows are reorganized.
• New Physical
– Represents the physical implementation of the
new system
Guidelines for Drawing DFDs
• Completeness
– DFD must include all components necessary for
system.
– Each component must be fully described in the
project dictionary or CASE repository.
• Consistency
– The extent to which information contained on one
level of a set of nested DFDs is also included on
other levels
Guidelines for Drawing DFDs
• Timing
– Time is not represented well on DFDs.
– Best to draw DFDs as if the system has never
started and will never stop.
• Iterative Development
– Analyst should expect to redraw diagram several
times before reaching the closest approximation
to the system being modeled.
Using DFDs as Analysis Tools
• Gap Analysis is the process of discovering
differences between two or more sets of DFDs
or differences within a single DFD.
• Inefficiencies in a system can often be
identified through DFDs.
Summary
• You learned how to:
– Understand logical process modeling via data flow
diagrams (DFDs).
– Draw well-structured DFDs.
– Decompose DFDs into lower-level diagrams.
– Balance high-level and low-level DFDs.
– Use DFDs for analyzing information systems.

You might also like