Software Engineering: Data
Flow Diagram – Part 2
BCA 4th Semester /B.Sc. 4th Semester
Paper Code: BCA(2204), B.Sc. (CC9)
Paulami Basu Ray
Assistant Professor
Department of Computer Science & Applications
Prabhat Kumar College, Contai
Example Software
Consider a software called RMS calculating Software:
Reads 3 integers in the range -1000 and +1000
Finds out the root mean square(rms) of the three input numbers
1
𝑋√ (𝑎2 +𝑏 2 + 𝑐 2 ) = 𝑅𝑀𝑆
3
Displays the result
How is Structured Analysis performed?
Initially represent software in the most abstract level:
Called the Context Diagram or Level 0 DFD
The entire system is represented as a single bubble.
The bubble is labelled as the main function of the system
Higher Level DFDs
Each high level function is separately decomposed into sub-functions:
o Identify the sub-functions
o Identify the data input to each sub-function
o Identify the data input from each sub-function
These are represented as DFDs
Example: RMS Calculating Software
Compute
RMS
Data-items 0
User
Results
Context Diagram (Level 0 DFD)
Level 1 DFD
Read numbers Validate
Data-items Numbers Numbers
0.1 0.2
error
Valid-numbers
rms
result Display
Compute
0.4
RMS
0.3
Level 2 DFD: Expansion of Read
Numbers bubble 0.1
Read 3
numbers numbers
data inputs
0.1.1
Level 2 DFD: Expansion of Validate
Numbers bubble
Check if a,b,c
Numbers >= -1000 and Valid-numbers
a,b,c <=1000
0.2.1
Invalid-numbers
Level 2 DFD: Expansion of Compute
RMS bubble 0.3
Compute Compute
Valid-numbers x √x = y
𝑎 + 𝑏 2 +𝑐 2 = x
2
0.3.1 0.3.2
Note : This expansion with
computation details are y
Compute
generally not included in a RMS 𝑦
RMS =
3
DFD, it is shown here for
0.3.3
better understanding of the
subsequent DFD levels
Level 2 DFD: Expansion of display
bubble
Display
Error message message: Invalid numbers
Number out
of range
0.4.1
result Display rms rms
0.4.2
Data Dictionary
A DFD is always accompanied by a data dictionary
A Data Dictionary lists all items appearing in a DFD
Example:
Gross Salary=Basic Salary + D.A. + H.R.A – I. Tax
Importance of Data Dictionary
Provides the team of developers the standard terminology for all data.
A consistent vocabulary for all data is important
The absence of Data Dictionary may cause unnecessary confusion
Data Dictionary Conventions
Composite data are defined in terms of primitive data items using simple
operators:
+ : denotes composition of data items
a + b represents a together with b
[,,] “ represents selection
Any one of the items inside the square bracket can occur
E.g. [a,b] denotes either a or b
Data Dictionary Conventions
(): Contents inside the bracket represents optional data
a + (b) represents either a + b or a.
{} : represents iterative data definition,
{name}5 represents 5 name data
{name}* represents 0 or more instances
= : represents equivalence
E.g. a = b + c represents b and c
** : Anything appearing within this is considered a comment
Data Dictionary for RMS Software
numbers=valid numbers= a+ b + c
a: integer *input number*
b: integer *input number*
c: integer *input number*
Data-items: a+b+c
Valid-numbers : a+b+c*integers in the range -1000 to 1000*
Invalid-numbers : [a,b,c] *integers not in the range -1000 to 1000*
error: string
Error message: string
Results: [RMS, error]
RMS: integer *root mean square value*
Reference
Software Engineering by Prof. Rajib Mall