You are on page 1of 47

System Analysis and Design

Data Flow Diagrams

Mona M. Nasr, Ph.D


Head of Information Systems Department
Ex-Vice Dean of Faculty of Computers and Artificial Intelligence, Helwan University for Community Service and Environmental
Development 
Ex-Vice Dean, Canadian International College (CIC), El Sheikh Zayed Campus
Mail(s): m.nasr@helwan.edu.eg
PROCESS (FUNCTIONAL) MODELING

 Process modeling involves graphically representing the


processes that capture, manipulate, store, and distribute
data:
◦ between a system and its environment
◦ among components within a system
[Source: Hoffer et al., 2001]

 Use information (functional and data requirements)


discovered during requirements elicitation.
PROCESS (FUNCTIONAL) MODELLING
 Data flow analysis using data flow diagrams (DFDs) is
the technique used in the traditional approach to
analysis and design.

 Result of process modeling:


◦ a set of coherent, complete, consistent, and interrelated data
flow diagrams.
◦ diagram elements fully defined and stored in CASE repository.
DATA FLOW DIAGRAMS (DFD)
A network representation of a system. That is, a diagram containing
nodes connected by directed links. It is graphically illustration of the
data movement between different elements of a system.
Useful:
 for showing the inter-relationships among different processes.
 for indicating the data inputs and outputs for each process within the
system.

They assist:
 in breaking the system down into identifiable and well-defined processes.
 in validating the analyst's understanding of the system.
WHERE DO DATA FLOW DIAGRAMS FIT?
DATA PROCESS INTERFACE
 Model functional
REQUIREMENTS Data Process
User
interface
(process)
ANALYSIS requirements requirements
requirements requirements
identified during
requirements
analysis.
DFDs, Use
CONCEPTUAL ERDs, Class FHDs,
DESIGN diagrams Correspond Case Correspond prototypes  Describe what the
with diagrams with

proposed system will


do not how.
 Can be transformed
tables,
LOGICAL columns, Programs/
Forms,
reports,
into pseudo code,
DESIGN rows, Operate on applications Interact with
objects menus decision trees, code,
forms, etc.
TYPES OF DATA FLOW DIAGRAMS
 Current physical:
◦ physical aspects and technology identified.

 Current logical:
◦ reduced to essence, ignores physical implementation.

 New logical:
◦ similar to current logical but represents new system (can be
same).

 New Physical:
◦ represents physical implementation of new system.
Gane-Sarson DeMarco-Yourdon
Process
Process Number Process Number

Process Process
Description Description

Process Place
 Processes transform incoming data flow(s) into outgoing data flow(s)
 Data flows must be modified in some way.
 Can specify basic operations:
◦ A – Add
◦ B – Browse
◦ C – Change
◦ D – Delete
 Labeled with a name (verb) indicating nature of transformation(s).
 Also labeled with a number indicating position in DFD hierarchy.
Gane-Sarson DeMarco-Yourdon
Entity
Entity Entity
Name Name

External entities
“is a person or organization, lying outside the context of a system, that is a net originator
or receiver of system data” [Source: DeMarco, 1979]
 Depicts origin and/or destination of data.
 Often referred to as sources and sinks.
 Anything flowing into the system must end up either in a
data store or out of the system at a sink.
 Labeled with a noun.

Source: is an external entity that are the origin of data flow


Sink : is an external entity that are the destination of data flow
Gane-Sarson DeMarco-Yourdon
Data Flow
Data Name Data Name
 Depict data in motion and are shown as named and directed links connecting
external entities, data stores, and processes.

 Knowing the composition of the packets (data items), the origin, and the
destination of a data flow is fundamental to the preparation of a DFD.

 Pairs of elements may be connected by more than one data flow.

 A data flow has a noun phrase label


Gane-Sarson DeMarco-Yourdon
Data Store
Data Data Store Data Data Store
Store Store
Symbol Name Symbol Name
 Depict data at rest.
 Temporary repositories for data.
 Real world examples include:
◦ disks
◦ tapes
◦ memory
◦ filing cabinets
◦ data bases
 Names of data stores are important and should be nouns.
Process
Process Number

Process
Description

Process Place

Rules
A. No process can have only outputs (a miracle)
B. No process can have only inputs (black hole)
C. A process has a verb phrase label
Process
Process Number

Process
Description

Process Place
Process
Process Number

Process
Description

Process Place
Entity
Entity Entity
Name Name

Entity
Name
Entity

Entity
Name

Entity
Name
Data Store

Data Store Data Store


Symbol Data Store Name Symbol Data Store Name

Data Store
Symbol Data Store Name

Rule
A. A data flow to a data store means update
B. A data flow from a data store means retrieve or use
Data Store

Data Data Store Data Data Store


Store Store
Symbol Name Symbol Name
Common Errors
Common Errors

Rule
Data cannot move directly from a source to a sink
Common Errors

Rule
Data cannot move directly from a source to a sink
Common Errors

Rule
D. Data cannot be moved directly from one store to another
E. Data cannot move directly from an outside source to a data store
F. Data cannot move directly from a data store to a data sink
G. Data store has a noun phrase label
Common Errors
Production Material requisition
Department

Check for Material


‫؟؟؟؟؟؟؟؟؟؟؟‬ availability

Rules
A. A data flow has only one direction of flow between symbols
B. A fork means that exactly the same data goes from a common location to two or
more processes, data stores or sources/sinks
C. A join means that exactly the same data comes from any two or more different
processes, data stores or sources/sinks to a common location
D. A data flow cannot go directly back to the same process it leaves
Common Errors
Phone Invoice and
company payment card

1
Invoice Payment
Pay
Payment card phone bill card and

payment
Monthly account report
Customer

3
New account application Prepare the
monthly
1 account report
for a customer
Account data Open new customer
account data
Account number
and address

customer data
Customer accounts

2 Frizzing account
Frizzing a letter
Accountant
customer Customer account
Status of a new data department
account
customer account
HOW DO WE MANAGE CLUTTER?
 Leveling (decomposition).
Process of transformation from a single system to individual components
(subsystems).

 Large DFDs divided into mini-DFDs.

 Hierarchically organized according to the level of detail


required by each DFD.

 How far should we decompose a DFD?


◦ Each process reduced to a single decision or operation.
◦ System user requires no further detail.
THE 7 ± 2 RULE
Also known as Miller’s number, refers to the number of
information chunks humans can remember and manipulate at
any one time.
[Source: Satzinger et al., 2007]

 This varies between 5 and 9 information blocks.

 Can be useful for:


◦ limiting levels of decomposition.
◦ number of processes in a single diagram.
◦ number of data flows into and out of a process.
STRUCTURE OF DATA FLOW DIAGRAMS
Context DFD
Can be merged

Top Level DFD

Level n DFD Level n DFD

Primitive DFD

Structured Pseudo
Chart Code
PROPOSED LIBRARY SYSTEM
CIRCULATION SUBSYSTEM
DATA MAINTENANCE SUBSYSTEM
BALANCING DFDS
 When decomposing a DFD, you must conserve inputs to, and
outputs from, a process at the next level of decomposition.
[Source: Valacich et al., 2006]

 Data flows that enter and leave a parent process must be


identical to those that enter and leave the child DFD.

 No new inputs or outputs should be introduced.


RESOLVED
FLOWS
 A data flow defined in the child DFD which is graphically
represented using a solid line.

 Is displayed within the parent process using a dotted line.

 Only occurs where the data flow goes outside of the parent
process.

 Usually represents more than one lower level flow:


◦ Three dots (… ) indicate multiple data flows.
DFD EXAMPLE
Draw the DFD for a distance education university. The enrolment
process works as follows: Students send in an application form
containing their personal details, and their desired course The
university checks that the course is available and that the student
has necessary academic qualifications. If the course is available the
student is enrolled in the course, and the university confirms the
enrolment by sending a confirmation letter to the student. If the
course is unavailable the student is sent a rejection letter.
DFD EXAMPLE
(CONT’D)
Read the problem description carefully looking for
 people/organizations/things that supply information to or
use information from the system => external entities (EE)
 actions/doing words/verbs => Processes (P)
 movement/exchange of information/data between external
entities to processes, and processes to processes => data
flows (DF)
 store/record information/data => data stores(DS)
DFD EXAMPLE
(CONT’D)
It often helps to walk through the system in its logical sequence; eg. starting with an
external entity (source), add data flows, processes and data stores as the data provided
by the entity is manipulated by the system. 
 A student (EE) sends in an application form (DF) containing their personal details, and their desired
course
 The university checks (P) that the course is available.
 If the course is available the student is enrolled (P) in the course, and the university confirms (P)
the enrolment by sending a confirmation letter (DF) that they are registered for the course to the
student.
 Or if the course is unavailable the student is sent a rejection letter (DF).
CONTEXT DIAGRAM
 Highest level DFD.
 Has data flows, external entities, one process (system in focus) and no
data stores.
 Shows the system boundary and interactions with external entities.

In this case:
 External entity   - Student
 Process    - Student Administration process application
 Data Flows        - Application Form, Confirmation/Rejection Letter

Application Details 0

Student
Student Administration
System
Confirmation/Rejection Details
SYSTEM/LEVEL 0
DFD
 External entity   - Student

 Processes         - Check available, Enroll student, Confirm


Registration

 Data Flows         - Application Form, Course Details, Course


Enrolment Details, Student Details,    Confirmation/Rejection
Letter

 Data Stores        - Courses, Students.


SYSTEM/LEVEL 0
DFD
ONLINE UNIVERSITY
At the beginning of eachREGISTRATION
semester students may request a course catalogue
containing a list of course offerings for the semester. Information about each
course, such as professor, department, and prerequisites will be included to help
students make informed decisions. The new on-line registration system will allow
students to select four course offerings for the coming semester. In addition, each
student will indicate two alternative choices in case a course offering becomes filled
or canceled. No course offering will have more than ten students. No course
offering will have fewer than three students. A course offering with fewer than
three students will be canceled. Once the registration process is completed for a
student, the registration system sends information to the billing system, so the
student can be billed for the semester. Professors must be able to access the on-line
system to indicate which courses they will be teaching. They will also need to see
which students signed up for their course offering. For each semester, there is a
period of time that students can change their schedules. Students must be able to
access the on-line system during this time to add or drop courses. The billing system
will credit all students for courses dropped during this period of time.
REGISTRATION CONTEXT
DIAGRAM
Course 0 Enrollment
information information
Course
Department Registration Students
Staff Course System Student
offerings schedules
LEVEL 0 DFD: REGISTRATION
Course Offering
Changes
1
Available
Maintain Available course request
Course Offering courses
List department 2
course Available courses
offerings Maintain Students
student Course enrollment
Course
Course enrollments
Offering Student schedule
Offerings Updates
Course
D2 enrollment Student
Course Offerings
Dept request schedule
Staff
Course
information D3 Enrollments Fee Payment
History
Student Enrollment
Report Request 3

Course Enrollment D1 Fees


Student information
Enrollment Enrollment
Report Reports
LEVEL 1 DFD (1 OF 3):
Department ID REGISTRATION
1.1 Course offering list

Course Offering Produce Department ID


List Request course
offering
list
1.2
New Course
Add new
New Course course
information
D2 Course Offerings
1.3
Dept. Course to
Staff delete Course to delete
Delete
course

Existing Course
1.4 information
Course modifications
Modify
existing
Course modifications
courses
LEVEL 1 DFD (2 OF 3):
REGISTRATION
Available Course
Request
2.1 Available courses

Available Produce
Courses course
offering
D2 Course Offerings
list
2.2
Course enrollment add
Add course
Course to add to schedule Fee payment history
to enrollment
D1 Fees

2.3 Course enrollment


Course to add
Students
delete
Delete
course from Course to delete
schedule

D3 Enrollments

2.4
Student enrollment
Current schedule request Obtain information
current
Student schedule schedule
LEVEL 1 DFD (3 OF 3):
REGISTRATION
3.1
Report
Request Obtain
report
type

Report
type

Course offering
3.2 information
Dept. D2 Course Offerings
Staff
Generate
requested
report
D3 Enrollments
Enrollment
Requested information
report
FURTHER READING

http://yourdon.com/strucanalysis/wiki/index.php?
title=Chapter_9
SUMMARY
 Basic concepts associated with DFDs
◦ data flows, processes, external entities, and data stores.
◦ leveling … dividing a large complex DFD into smaller related
DFDs
◦ balancing … flows in and out of a parent process are identical
to that of the child DFD
◦ resolved data flows … collectively representing the flow of
data between an external entity and a child (local) process

Rules for DFD construction.


QUESTIONS FOR THE WEEK
 Describe the different ways data flow diagrams can assist and
improve software development. Are there limitations?

 External entities are also known as sources and sinks. Explain


why and provide examples to clarify your answers.

 How can DFD elements such as data flows, processes, and data
stores assist the construction and verification of Entity
relationship diagrams (ERDs)?

 What do we mean when a DFD is balanced and levelled?

 The notation used by Oracle Designer to represent DFDs has an


element called a resolved flow. Define this element and
explain how they improve data flow diagrams.

You might also like