Data Flow Diagrams (DFDS) : Specific Instructional Objective
Data Flow Diagrams (DFDS) : Specific Instructional Objective
(DFDs)
Specific Instructional Objective
At the end of this lesson the student will be able to:
• Identify the activities carried out during the structured analysis phase.
• Explain what a DFD is.
• Explain why constructing DFDs are important in arriving at a good software
design.
• Explain what a data dictionary is.
• Explain the importance of data dictionary.
• Identify whether a DFD is balanced.
Structured Analysis
Structured analysis is used to carry out the top-down decomposition of a set of
high-level functions depicted in the problem description and to represent them
graphically. During structured analysis, functional decomposition of the system is
achieved. That is, each function that the system performs is analyzed and
hierarchically decomposed into more detailed functions. Structured analysis
technique is based on the following essential underlying principles:
Data Flow
Data Store
(a)
number
read- validate-
number valid-
data-item number
numbe r
( b)
read- validate-
data-item number number valid-
numbe r
number
Here, two examples of data flow that describe input and validation of data are
considered. In Fig. 5.1(b), the two processes are directly connected by a data
flow. This means that the ‘validate-number’ process can start only after the
‘readnumber’ process had supplied data to it. However in Fig 5.1(c), the two
processes are connected through a data store. Hence, the operations of the two
bubbles are independent. The first one is termed ‘synchronous’ and the second
one ‘asynchronous’.
Data dictionary
A data dictionary lists all data items appearing in the DFD model of a system. The
data items listed include all data flows and the contents of all data stores
appearing on the DFDs in the DFD model of a system. A data dictionary lists the
purpose of all data items and the definition of all composite data items in terms of
their component data items. For example, a data dictionary entry may represent
that the data grossPay consists of the components regularPay and overtimePay.
For the smallest units of data items, the data dictionary lists their name and their
type. Composite data items can be defined in terms of primitive data items using
the following data definition operators:
+: denotes composition of two data items, e.g. a+b represents data a and
b.
move
Human Player
( a)
game
display-
move board
0.1
validate-
move
0.2
board
result
check-
winner
play-
0.4
move
0.3
( b)
Fig 5.2 (a), (b) Level 0 and Level 1 DFD for Tic-Tac-Toe game described
in Example 1
It may be recalled that the DFD model of a system typically consists of
several DFDs: level 0, level 1, etc. However, a single data dictionary
should capture all the data appearing in all the DFDs constituting the
model. Figure 5.2 represents the level 0 and level 1 DFDs for the tic-
tactoe game. The data dictionary for the model is given below.
• A data dictionary provides a standard terminology for all relevant data for use by
the engineers working in a project. A consistent vocabulary for data items is very
important, since in large projects different engineers of the project have a
tendency to use different terms to refer to the same data, which unnecessary
causes confusion.
• The data dictionary provides the analyst with a means to determine the definition
of different data structures in terms of their component elements.
Balancing a DFD
The data that flow into or out of a bubble must match the data flow at the next
level of DFD. This is known as balancing a DFD. The concept of balancing a DFD
has been illustrated in fig. 5.3. In the level 1 of the DFD, data items d1 and d3
flow out of the bubble 0.1 and the data item d2 flows into the bubble 0.1. In the
next level, bubble 0.1 is decomposed. The decomposition is balanced, as d1 and
d3 flow out of the level 2 diagram and d2 flows in.