Data and Process Modeling
Data and Process Modeling
Software Engineering-I
2 Software Engineering-I
DATA FLOW DIAGRAMS
A data flow diagram (DFD) shows how data
moves through an information system but
does not show program logic or processing
steps.
A set of DFDs provides a logical model that
shows what the system does, not how it does
it.
3 Software Engineering-I
DFD Symbols
DFDs use four basic symbols that represent
processes, data flows, data stores, and
entities.
Several different versions of DFD symbols
exist, but they all serve the same purpose.
Gane and Sarson symbol set.
Yourdon symbol set.
Symbols are referenced by using all capital
letters for the symbol name.
4 Software Engineering-I
PROCESS
A process receives input data and produces
output that has a different content, form, or
both.
Processes can be very simple or quite
complex.
Processes contain the business logic, also
called business rules, that transform the data
and produce the required results.
5 Software Engineering-I
PROCESS SYMBOL
The process name identifies a specific function and
consists of a verb (and an adjective, if necessary)
followed by a singular noun.
Examples
APPLY RENT PAYMENT, CALCULATE COMMISSION, ASSIGN
FINAL GRADE, VERIFY ORDER, and FILL ORDER.
Processing details are not shown in a DFD.
For example, you might have a process named
DEPOSIT PAYMENT.
The process symbol does not reveal the business
logic for the DEPOSIT PAYMENT process.
To document the logic, you create a process
description.
6 Software Engineering-I
Data flow diagram symbols, symbol
names, and examples
7 Software Engineering-I
Cont…..
In DFDs, a process symbol can be referred to as
a black box, because the inputs, outputs,
and general functions of the process are known,
but the underlying details and logic of the
process are hidden.
We can zoom in on a process symbol and create
a more in-depth DFD that shows the process’s
internal workings — which might reveal even
more processes, data flows, and data stores.
In this manner, the information system can be
modeled as a series of increasingly detailed
pictures.
8 Software Engineering-I
DATA FLOW
A data flow is a path for data to move
from one part of the information system to
another.
A data flow in a DFD represents one or more
data items.
For example, a data flow could consist of a single
data item (such as a student ID number) or
It could include a set of data (such as a class
roster with student ID numbers, names, and
registration dates for a specific class).
9 Software Engineering-I
DATA FLOW SYMBOL
The symbol for a data flow is a line with a single or
double arrowhead.
The data flow name appears above, below, or
alongside the line.
A data flow name consists of a singular noun and
an adjective, if needed.
Examples
DEPOSIT, INVOICE PAYMENT, STUDENT GRADE, ORDER,
and COMMISSION.
Exceptions to the singular name rule are data flow
names, such as GRADING PARAMETERS, where a
singular name could mislead you into thinking a
single parameter or single item of data exists.
10 Software Engineering-I
Examples of correct combinations of
data flow and process symbols.
11 Software Engineering-I
Examples of incorrect combinations of
data flow and process symbols.
Spontaneous generation
Black hole
Gray hole
12 Software Engineering-I
DATA STORE
A data store is used in a DFD to
represent data that the system stores
because one or more processes need to use
the data at a later time.
For instance, instructors need to store student
scores on tests and assignments during the
semester so they can assign final grades at
the end of the term.
A DFD does not show the detailed contents of
a data store
13 Software Engineering-I
DATA STORE SYMBOL
In a DFD, the Gane and Sarson symbol for a data store is a
flat rectangle that is open on the right side and closed on
the left side.
The name of the data store appears between the lines and
identifies the data it contains.
A data store name is a plural name consisting of a noun
and adjectives, if needed.
Examples of data store names are
STUDENTS, ACCOUNTS RECEIVABLE, PRODUCTS, DAILY
PAYMENTS, PURCHASE ORDERS, OUTSTANDING CHECKS,
INSURANCE POLICIES, and EMPLOYEES.
Exceptions to the plural name rule are collective nouns
that represent multiple occurrences of objects.
For example, GRADEBOOK represents a group of students
and their scores.
14 Software Engineering-I
Examples of correct uses of data store
symbols in a data flow diagram.
16 Software Engineering-I
Cont….
In some situations, a data store has no input
data flow because it contains fixed reference
data that is not updated by the system.
For example,
Consider a data store called TAX TABLE, which
contains withholding tax data that a company
downloads from the Internal Revenue Service.
When the company runs its payroll, the
CALCULATE WITHHOLDING process accesses data
from this data store.
On a DFD, this would be represented as a one-way
outgoing data flow from the TAX TABLE data store
into the CALCULATE WITHHOLDING process.
17 Software Engineering-I
ENTITY
A DFD shows only external entities that provide
data to the system or receive output from the
system.
A DFD shows the boundaries of the system and
how the system interfaces with the outside world.
For example,
A customer entity submits an order to an order
processing system.
Other examples of entities include a patient who
supplies data to a medical records system, a
homeowner who receives a bill from a city property tax
system, or an accounts payable system that receives
data from the company’s purchasing system.
18 Software Engineering-I
Cont….
DFD entities also are called terminators, because they
are data origins or final destinations.
Systems analysts call an entity that supplies data to the
system a source, and an entity that receives data from
the system a sink.
An entity name is the singular form of a department,
outside organization, other information system, or person.
An external entity can be a source or a sink or both, but
each entity must be connected to a process by a data
flow.
ENTITY SYMBOL
The symbol for an entity is a rectangle, which may be
shaded to make it look three-dimensional.
The name of the entity appears inside the symbol.
19 Software Engineering-I
Examples of correct uses of external
entities in a data flow diagram
20 Software Engineering-I
Examples of incorrect uses of external
entities
21 Software Engineering-I
Guidelines for Drawing DFDs
Step 1: Draw a Context
Diagram
The first step in constructing
a set of DFDs is to draw a
context diagram.
A context diagram is a
top-level view of an
information system that
shows the system’s
boundaries and scope.
24 Software Engineering-I
Step 3: Draw the Lower-Level
Diagrams
To create lower-level diagrams, you must use
leveling and balancing techniques.
Leveling is the process of drawing a series of
increasingly detailed diagrams, until all
functional primitives are identified.
Balancing maintains consistency among a
set of DFDs by ensuring that input and output
data flows align properly.
25 Software Engineering-I
Leveling Example
Diagram 1 DFD shows
Diagram 0 details of the FILL ORDER
26 Software Engineering-I
Balancing Example
Order System Diagram 0 DFD Order System Diagram 3 DFD
The two DFDs are balanced, because the child diagram at the bottom
has the same input and output flows as the parent process 3 shown at
the top.
27 Software Engineering-I
Lab Tasks
Activity 1:
By considering your knowledge about Library
System draw a context level data-flow diagram for
a simple library system intended to automate the
issuing of library items. You may use any of
instructed DFD (Gane and Sarson or Yourdon)
symbol set.
Activity 2:
Draw the next level of the data-flow diagram
by decomposing the library system bubble into
its sub-functions which shall participate in
issuing of library items.
28 Software Engineering-I