Software
Engineering
Recap
Behavioural Models
•Behavioural models are used to describe the overall behaviour of a system.
•Two types of behavioural model are:
Data processing models that show how data is processed as it moves through the
system
State machine models that show the systems response to events.
•These models show different perspectives so both of them are required to
describe the system’s behaviour.
Data Flow Model
•Captures the flow of data in a system
•It helps in developing an understanding of system’s functionality
•What are the different sources of data, what different transformations take
place on data and what are final outputs generated by these transformations
Data Flow Diagram (DFD)
DFD’s Model the following aspects of the system:
1. sources and destinations of data
2. data inputs and outputs
3. actions that transform inputs into outputs
4. data maintained by the system
DFD Components
•DFDs consist of four basic components that illustrate how data flows in a
system: entity, process, data store, and data flow.
•Process
• work or actions performed on data (inside the system).
• Should contain a process identification number and a process label
•Data Store
• Where date rests within the system
• Also known as data repository
• It is where data is temporarily or permanently stored or held
•Source/ Sink (Entity)
• External entity that is origin or destination of data (outside the system)
• does not perform any system processes
• name of entity goes inside the symbol
•Data flows
• Arrows depicting the movement of data
• These arrows are used to trace the flow of information throughout the system
The DFD Notation
DFD Components
Entity:
An entity is the source or destination of data. The source in a DFD represents these
entities that are outside the context of the system. Entities either provide data to the
system (referred to as a source) or receive data from it (referred to as a sink).
Process:
The process is the manipulation or work that transforms data. In other words, a
process receives input and generates some output. Process names (simple verbs and
dataflow names, such as “Submit Payment” or “Get Invoice”).
08/04/2025 CSE291 - Introduction to Software Engineering 9
DFD Components
Data Store:
A data store is where a process stores data between processes for later retrieval by
that same process or another one. Files and tables are considered data stores. Data
store names (plural) are simple but meaningful, such as “customers,” “orders,” and
“products.”
Data Flow:
Data flow is the movement of data between the entity, the process, and the data
store. Data flow portrays the interface between the components of the DFD. The flow
of data in a DFD is named to reflect the nature of the data used (these names should
also be unique within a specific DFD).
DFD Components
DFD Diagramming Rules
(Process)
No process can have only outputs or only inputs.
Processes must have both outputs and inputs.
Process labels should be verb phrases.
DFD Diagramming Rules (Data
Stores)
All flows to or from a data store must
move through a process.
Data Store labels should be noun phrases.
DFD Diagramming Rules
(Source/Sink)
No data moves directly between external entities
without going through a process.
Source and Sink labels should be noun phrases.
DFD Diagramming Rules
(Dataflow)
Bidirectional flow
between process
and data store is
represented by
two separate
arrows.
DFD Diagramming Rules
(Dataflow)
Data flow cannot go
directly from a
process to itself,
must go through
intervening
processes.
DFD Diagramming Rules
(Dataflow)
Data flow from a process to a data store means update (insert, delete or
change).
Data flow from a data store to a process means retrieve or use.
DFD Levels
Context DFD
Level-1 DFD
Level-n DFD
Context Diagram / Level-0 of Burger’s food ordering
system
Context diagram shows the
system boundaries, external
entities that interact with
the system, and major
information flows between
entities and the system.
NOTE: only one process symbol
Level-1 DFD
Level-1 DFD shows the
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-2 DFD
Level-2 DFD shows the
sub-processes of one of
the processes in the Level-
0 DFD.
This is a Level-2 DFD for
Process 4.0.
Processes are labeled 4.1,
4.2, etc. These can be
further decomposed in
more primitive (lower-level)
DFDs if necessary.
Level-n DFD
Processes are labeled 4.3.1,
4.3.2, etc. If this is the lowest
level of the hierarchy, it is
called a primitive DFD.
Case Study
Draw a context level data flow diagram for a patient monitoring system.
Process of patient monitoring system:
A patient’s vital signs are transmitted to this system, which may invoke a warning message to the
nurse if these signs fall into the critical range. Nurse may request for a report, which the patient
monitoring system retrieves from the patient log, and returns it to the nurse again.