0% found this document useful (0 votes)
25 views

Software Engineering Lecture - DFD

Uploaded by

sp23-bcs-019
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Software Engineering Lecture - DFD

Uploaded by

sp23-bcs-019
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

CSC291 - Software Engineering

Concepts
(Spring 2024)

Data Flow Diagram (DFD)


06/11/2024 2

Behavioural Models
Behavioral models are used to describe the overall behavior of a
system.

Two types of behavioral models are:

Data processing models that show how data is processed


as it moves through the system.

State machine models that show how the systems respond to


events.
06/11/2024 3

Data Flow Diagram (DFD)

The distinguishing features of DFDs are as follows:

1. Data flow diagrams capture the flow of data in a system.

2. It describes data origination, transformations, and


consumption in a system.
06/11/2024 4

The DFD Notation


06/11/2024 5

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).
Data Store: Data at rest (inside the system).
Source/ Sink: External entity that is origin or destination of
data (outside the system).
Data flow: arrows depicting movement of data.
06/11/2024 6

DFD Components
Entity:
An entity is the source or destination of data. 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, such as “Submit Payment” or “Get
Invoice”).
06/11/2024 7

DFD Components
Data Store:
A data store is where a process stores data for later retrieval by that
same process or another one. Files and tables are considered data
stores. Data store names 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.
06/11/2024 8

DFD Components
06/11/2024 9

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.


06/11/2024 10

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.
06/11/2024 11

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 .


06/11/2024 12

DFD Diagramming Rules (Dataflow)

Bidirectional flow
between process
and data store is
represented by
two separate
arrows.
06/11/2024 13

DFD Diagramming Rules (Dataflow)

Data flow cannot go


directly from a process
to itself, must go
through intervening
processes.
06/11/2024 14

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.
06/11/2024 15

DFD Levels

• Context / Level-0 DFD

• Level 1DFD

• Level- 2 DFD

• Level-n DFD
06/11/2024 16

Context Diagram 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


06/11/2024 17

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.
06/11/2024 18

Level-2 DFD

Level-1 DFD shows the


sub-processes of one of
the processes in the
Level-0 DFD.

This is a Level-1 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.
06/11/2024 19

Level-n DFD

Level-n DFD shows the


sub-processes of one of the
processes in the Level n-1
DFD.

This is a Level-3 DFD for


Process 4.3.
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.
06/11/2024 20

Exercise 1:
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.
06/11/2024 21

Exercise 2
• A Customer can place an Order. The Order Food process receives
the Order, forwards it to the Chef, store it in the Order data store, and
store the updated Inventory details in the Inventory data store. The
process also delivers a Bill to the Customer.
• The Manager can receive Reports through the Generate Reports
process, which takes Inventory details and Orders as input from the
Inventory and Order data store respectively.
• The Manager can also initiate the Order Inventory process by
providing an Inventory order. The process forwards the Inventory
order to the Supplier and stores the updated Inventory details in the
Inventory data store.

Draw DFD Level 1 Diagram for the above scenario.


06/11/2024 22

Solution

You might also like