0% found this document useful (0 votes)
43 views76 pages

Functional Modelling DFD

Uploaded by

Abhishekh Singh
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)
43 views76 pages

Functional Modelling DFD

Uploaded by

Abhishekh Singh
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/ 76

FUNCTIONAL

MODELLING
&
Creating Data
Flow Model
Different types of modelling of
Software Systems
1. Data modelling: implemented through ER
diagrams.
2. Functional modelling – implemented through DFD
and CFG
3. Behavioural modelling – implemented through
Structured Charts
Functional Modelling and Information Flow

 Information is transformed as it flows through a computer-based system.


 The system accepts input in a variety of forms; applies hardware, software, and human
elements to transform it;
 and produces output in a variety of forms.
 Input may be a control signal transmitted by a transducer, a series of numbers typed by
a human operator, a packet of information transmitted on a network link, or a
voluminous data file retrieved from secondary storage.
 The transform(s) may comprise a single logical comparison, a complex numerical
algorithm, or a rule-inference approach of an expert system.
 Output may light a single LED or produce a 200-page report. In effect, we can create a
flow model for any computer-based system, regardless of size and complexity.
 Structured analysis began as an information flow modeling technique.
 A computer- based system is represented as an information transform
.
 A rectangle is used to represent an external entity; that is, a system
element (e.g., hardware, a person, another program) or another
system that produces information for transformation by the software
or receives information produced by the software.
 A circle (sometimes called a bubble) represents a process or transform
that is applied to data (or control) and changes it in some way.
 An arrow represents one or more data items (data objects). All arrows
on a data flow diagram should be labeled.
 The double line represents a data store—stored information that is
used by the software.
 The simplicity of DFD notation is one reason why structured analysis
techniques are widely used
Functional Modelling and Information Flow
➢ The functional model describes the computations that take place within a
system.
➢ It is the third dimension in modeling
➢object-modeling looks at the static structure of the system,
➢dynamic modeling looks at the events in the system,
➢and functional modeling looks at the functionality of the system.
➢In other words, the functional model of a system specifies what happens
in the system,

➢ The dynamic model specifies when it happens,


➢ And the class model specifies what it happens to.
➢ A functional model of a system specifies how the output values are
computed in the system from the input values, without considering the
control aspects of the computation.
 This represents the functional view of the system—the mapping
from inputs to outputs and the various steps involved in the
mapping.
 Generally, when the transformation from the inputs to outputs is
complex, consisting of many steps, the functional modeling is
likely to be useful. In systems where the transformation of inputs
to outputs is not complex, the functional model is likely to be
straightforward.

 The functional model of a system (either the problem domain


or the solution domain) can be represented by a data flow
diagram (DFD).
 The basic purpose of doing functional modeling, when the
goal is to obtain an object-oriented design for the system, is to
use the model to make sure that the object model can
perform the transformations required from the system.
 As processes represent operations and in an object-oriented
system, most of the processing is done by operations on
classes, all processes should show up as operations on classes.
 Some operations might appear as single operations on an
object; others might appear as multiple operations on
different classes, depending on the level of abstraction of the
DFD.
 If the DFD is sufficiently detailed, most processes will occur as
operations on classes. The DFD also specifies the abstract
signature of the operations by identifying the inputs and
outputs.
Functional Modelling and Information Flow
Functional Modelling provides the outline that what the system is
supposed to do.It does not describes what is the need of evaluation of
data, when they are evaluated and how they are evaluated apart from
all it only represent origin of data values.It describes the function of
internal processes with the help of DFD (Data Flow Diagram).
Data Flow Diagrams: Function modelling is represented with the help
of DFDs. DFD is the graphically representation of data.It shows the
input, output and processing of the system .When we are trying to
create our own business, website, system, project then there is need to
find out how information passes from one process to another so all are
done by DFD. There are number of levels in DFD but upto third level
DFD is sufficient for understanding of any system.
The basic components of the DFD are:
External Entity :
External entity is the entity that takes information
and gives information to the system. It is
represented with rectangle.
Data Flow :
The data passes from one place to another is
shown by data flow. Data flow is represented
with arrow and some information written over it.
 Process :
It is also called function symbol. It is used to process all the information.
If there are calculations so all are done in the process part. It is represented
with circle and name of the process and level of DFD written inside it.
 Data Store :
It is used to store the information and retrieve the stored information. It is
represented with double parallel lines.
 Some Guidelines for creating a DFD:
 Every process must have meaningful name and number.
 Level 0 DFD must have only one process.
 Every data flow and arrow has given the name.
 DFD should be logical consistent.
 DFD should be organised in such a way that it is easy to
understand.
 There should be no loop in the DFD.
 Each DFD should not have more than 6 processes.
 The process can only connected with process, external entity and
data store.
 External entity cannot be directly connected with external entity.
 The direction of DFD is left to right and top to bottom
representation
DATA FLOW MODEL
➢ It is important to note that no explicit indication of the sequence of processing or conditional logic is supplied by the diagram. Procedure or sequence
may be implicit in the diagram, but explicit logical details are generally delayed until software design. It is important not to confuse a DFD with the
flowchart.
➢ Data Flow Diagrams
➢ As information moves through software, it is modified by a series of transformations.
➢ A data flow diagram is a graphical representation that depicts information flow and the transforms that are applied as data move from input to output.
➢ The basic form of a data flow diagram, also known as a data flow graph or a bubble chart, is illustrated in the figure below.
The Data Flow Model
THE DEFINITION
A Data Flow Diagram is graphical representation that depicts
information flow & the transformations that are applied as data
move from input to output.
DFD may used to represent the SYSTEM or SOFTWARE at any level of
abstraction. It may partitioned into levels that represent increasing
information flow & functional details.
It also analyze the process, stored data and delay in the system.
LOGICAL DFD is the basis from which component / subsystems and
interfaces are developed in specific software.
PHYSICAL DFD is actually implementation & movement of data
between people, departments, computer etc. (independent physical
components).
Flow Modelling Notation
SOURCE, DESTINATION, INTERFACE, EXTERNAL
ENTITY
PROCESS
DATA FLOW DIAGRAMMING:GUIDELINES

All notations must be labeled with meaningful names


The DFD evolves through a number of levels of detail
Always begin with a Context level diagram (also called level 0)
Always show external entities at level 0
Always label data flow arrows
Do not represent procedural logic
DATA FLOW
DATA STORES
CONSTRUCTING A DFD—0
CONSTRUCTING A DFD—1

Review Scope Statement and ERD to isolate data objects


and grammatical parse to determine “operations”
Determine external entities (producers and consumers of
data
Create A chart for details Processes / Activities that has
to perform by system i.e. PROCESS CHART. Using
process chart and CFD develop DFD-1, DFD –2 and so
on.
CONSTRUCTING A DFD—1
FLOW MODELING NOTES

Each bubble is refined until it does just one thing


The expansion ratio decreases as the number of levels
increase
Most systems require between 3 to 7 levels for an
adequate flow model
A single data flow item (arrow) may be expanded as
levels increase (data dictionary provides information)
Pros of Data Flow Diagrams
(DFDs)
•A DFD model:
– Uses limited types of symbols.
– Simple set of rules
– Easy to understand ---a
hierarchical model.
Note that in context
diagram, there is one
process numbered zero.
This is the highest level
DFD. In subsequent lower
levels, the process 0 is
exploded or decomposed
to subprocesses, 0.1, 0.2
etc.
Note that the process 0 is exploded to 0.1, 0.2, 0.3 and 0.4. The DFD at level 1
must be balanced. It means the input to process 0 as a whole and output from
process 0as a whole should be same as in DFD level 0 or context diagram. Note
that input to 0.1 is Data items (same as in process 0 in DFL level 0) and output is
result from Display 0.4 (same as output of process 0 in context diagram). Thus
the exploded or decomposed Level 1 DFD is balanced.
Alternatively, we may decompose to Level 2
as shown in the figure.
Process 0.2 compute rms in level 1 is further
decomposed 0.2.1 thru 0.2.5 in balanced
manner to yield the rms value in level 2. a, b,
c are the valid data items whose square
vales are taken and mean is computed in
0.2.4 to give the root value 0.2.5.
Data dictionary for the DFD model of
rms calculating software
data-items: {integer}3
rms: float
valid-data:data-items
a: integer
b: integer
c: integer
asq: integer
bsq: integer
csq: integer
msq: integer

Data dictionary gives details of all data items for


all levels of DFDs.
How far is the decomposition allowed?
3 to 7 levels. Most complex business
applications require maximum 3-4 levels of
factoring or decomposition.
Balancing a decomposition
DATA DICTIONARY
EXAMPLE: Tic-tac-to(Tic-Tac-Toe Computer Game ) Tic-tac-toe is a computer game in
which a human player and the computer make alternate moves on a 3 × 3
square. A move consists of marking a previously unmarked square. The
player who is first to place three consecutive marks along a straight line (i.e.,
along a row, column, or diagonal) on the square wins. As soon as either of
the human player or the computer wins, a message congratulating 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.
The context diagram and the level 1 DFD are shown.
Data dictionary for the DFD model
of tic tac toe game
move: integer /* number between
1 to 9 */
display: game+result
game: board
board: {integer}9
result: [“computer won”, “human
won”, “drawn”]
Example 3 (Supermarket Prize Scheme) A super market needs
to develop a software that would help it to automate a
scheme that it plans to introduce to encourage regular
customers. In this scheme, a customer would have first register
by supplying his/her residence address, telephone number,
and the driving license number.
Each customer who registers for this scheme is assigned a
unique customer number (CN) by the computer. A customer
can present his CN to the check out staff when he makes any
purchase. In this case, the value of his purchase is credited
against his CN. At the end of each year, the supermarket
intends to award surprise gifts to 10 customers who make the
highest total purchase over the year. Also, it intends to award a
22 caret gold coin to every customer whose purchase
exceeded Rs. 10,000. The entries against the CN are reset on
the last day of every year after the prize winners’ lists are
generated.

You might also like