0% found this document useful (0 votes)
30 views32 pages

Data Flow Diagrams: DFD Is An Elegant Modelling Technique

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)
30 views32 pages

Data Flow Diagrams: DFD Is An Elegant Modelling Technique

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/ 32

Data flow diagrams

DFD is an elegant modelling


technique:
useful not only to represent the results
of structured analysis
applicable to other areas also:
e.g. for showing the flow of documents or
items in an organization,
DFD technique is very popular
because
it is simple to understand and use.
1
Data flow diagram

DFD is a hierarchical
graphical model:
shows the different functions
(or processes) of the system
and
data interchange among the
processes.

2
DFD Concepts
It is useful to consider each
function as a processing
station:
each function consumes some
input data and
produces some output data.

3
Data Flow Model of a Car
Assembly Unit
Engine Store Door Store

Chassis with Partly


Engine Assembled
Fit Fit Car Fit Paint and
Engine Doors Wheels Test
Assembled
Car Car

Chassis Store Wheel Store

4
Data Flow Diagrams (DFDs)

A DFD model:
uses limited types of symbols.
simple set of rules
easy to understand:
it is a hierarchical model.

5
Data Flow Diagrams (DFDs)

Primitive Symbols Used for Constructing DFDs:

6
External Entity Symbol
Represented by a rectangle
External entities are real Librarian
physical entities:
input data to the system or
consume data produced by the
system.
Sometimes external entities are
called terminator, source, or sink.
7
Function Symbol
A function such as “search-book” is
represented using a circle: search-
This symbol is called a book
process or bubble or transform.
Bubbles are annotated with
corresponding function names.
Functions represent some activity:
function names should be verbs.

8
Data Flow Symbol

A directed arc or line.


book-name
represents data flow in the
direction of the arrow.
Data flow symbols are
annotated with names of data
they carry.

9
Data Store Symbol
Represents a logical file:
A logical file can be:
book-details
a data structure
a physical file on disk.
Each data store is connected
to a process:
by means of a data flow
symbol.

10
Data Store Symbol
Direction of data flow arrow:find-book
shows whether data is being read
from or written into it. Books
An arrow into or out of a data
store:
implicitly represents the entire data of
the data store
arrows connecting to a data store
need not be annotated with any data
name.
11
Synchronous operation

If two bubbles are directly


connected by a data flow arrow:
they are synchronous
Read- number Validate-
numbers numbers
0.1 0.2 Valid
Data- number
items

12
Asynchronous operation
If two bubbles are connected via a
data store:
they are not synchronous.
Read- Validate-
numbers numbers
0.1 0.2
numbers Valid
Data- number
items

13
Yourdon's vs. Gane Sarson
Notations

The notations that we would be


following are closer to the Yourdon's
notations
You may sometimes find notations in
books that are slightly different
For example, the data store may look like
a box with one end closed

14
How is Structured Analysis
Performed?
Initially represent the software
at the most abstract level:
called the context diagram.
the entire system is represented
as a single bubble,
this bubble is labelled according
to the main function of the
system.

15
Tic-tac-toe: Context
Diagram

Tic-tac-toe
display software

move
Human Player

16
Context Diagram
A context diagram shows:
data input to the system,
output data generated by
the system,
external entities.

17
Context Diagram
Context diagram captures:
various entities external to the
system and interacting with it.
data flow occurring between the
system and the external entities.
The context diagram is also
called as the level 0 DFD.

18
Context Diagram
Context diagram
establishes the context of the
system, i.e.
represents:
Data sources
Data sinks.

19
Level 1 DFD
Examine the SRS document:
Represent each high-level
function as a bubble.
Represent data input to every
high-level function.
Represent data output from every
high-level function.

20
Higher level DFDs
Each high-level function is
separately decomposed into
subfunctions:
identify the subfunctions of the
function
identify the data input to each
subfunction
identify the data output from each
subfunction
These are represented as DFDs.
21
Decomposition
Decomposition of a bubble:
also called factoring or
exploding.
Each bubble is decomposed
to
between 3 to 7 bubbles.

22
Decomposition

Too few bubbles make


decomposition superfluous:
if a bubble is decomposed to
just one or two bubbles:
then this decomposition is
redundant.

23
Decomposition

Too many bubbles:


more than 7 bubbles at
any level of a DFD
make the DFD model hard
to understand.

24
Decompose how long?

Decomposition of a
bubble should be carried
on until:
a level at which the
function of the bubble can
be described using a
simple algorithm.
25
Data Dictionary
A DFD is always accompanied by a data
dictionary.
A data dictionary lists all data items
appearing in a DFD:
definition of all composite data items in
terms of their component data items.
all data names along with the purpose of
data items.
For example, a data dictionary entry may
be:
grossPay = regularPay+overtimePay
26
Importance of Data
Dictionary
Provides all engineers in a project
with standard terminology for all
data:
A consistent vocabulary for data is
very important
different engineers tend to use
different terms to refer to the same
data,
causes unnecessary confusion.

27
Importance of Data
Dictionary
Data dictionary provides the
definition of different data:
in terms of their component elements.
For large systems,
the data dictionary grows rapidly in
size and complexity.
Typical projects can have thousands of
data dictionary entries.
It is extremely difficult to maintain
such a dictionary manually.
28
Example: Tic-Tac-Toe
Computer Game
A human player and the computer make
alternate moves on a 3 3 square.
A move consists of marking a previously
unmarked square.
The user inputs a number between 1
and 9 to mark a square
Whoever is first to place three
consecutive marks along a straight line
(i.e., along a row, column, or diagonal)
on the square wins.
29
Example: Tic-Tac-Toe
Computer Game
As soon as either of the human player or
the computer wins,
a message announcing the winner should be
displayed.
If neither player manages to get three
consecutive marks along a straight line,
and all the squares on the board are filled up,
then the game is drawn.
The computer always tries to win a
game.

30
Context Diagram for
Example
Tic-tac-toe
software
display 0

move
Human Player

31
Level 1 DFD
Display- game
board
move 0.1 result

Validate- Check-
move board winner
0.2 0.4

Play-
move
0.3

32

You might also like