You are on page 1of 39

08-02-2022

DFD
By
Dr.Pooja Jain

Process Documentation
• Preparing and using process documentation is a important skill for an
accountant.
• Data flow diagrams portray a business process activities, stores of
data, and flows of data among those elements.
• System flowcharts present a comprehensive picture of the
management, operations, information systems, and process controls
embodied in business processes.

1
08-02-2022

Data Flow Diagrams


 A graphical tool, useful for communicating with
users, managers, and other personnel.
 Used to perform structured analysis to determine
logical requirements.
 Useful for analyzing existing as well as proposed
systems.
 Focus on the movement of data between external
entities and processes, and between processes and
data stores.
 A relatively simple technique to learn and use.

Data Flow Diagrams


• Data flow diagram: is a graphical modeling tool to depict the flow of
data through a system and the work or processing performed by that
system.
• What’s the system doing?
• Use a limited number of symbols.
• Do not depict management or operational elements of a system.

2
08-02-2022

Data Flow Diagram (DFD)


• Key points for modeling
• How data moves through the organization
• Relationships between various data flows
• Storage of data
• There are no FIXED rules about how a DFD should be developed…
• There is no such a DFD call “CORRECT DFD”…
• It is ambiguous development process

Why DFD ?
 Provides an overview of-
 What data a system processes
 What transformations are performed
 What data are stored
 What results are produced and where they flow
 Graphical nature makes it a good communication tool
between-
 User and analyst
 Analyst and System designer

3
08-02-2022

DFD elements

Source/Sinks (External entities)


Data flows
Processes
Data Stores

External Entities

External
 A Rectangle represents Entities
an external entity
 They either supplyor
receive data • Source – Entity that
They do not processdata supplies data to the
system.
• Sink – Entity that
receives data from the
system.

4
08-02-2022

Data Flows
 Data in motion
 Marks movement of data through the system - a pipeline to carry
data.
Data Flow
 Connects the processes, external
• entities and data stores.
 Generally unidirectional, If same
data flows in both directions,
double-headed arrow can be
used.

Delivery Slip

Processes Stores demand


note
1.
STORES
Issue Slip

 A circle represents aprocess


 Straight line with incoming arrows are input data
flows
 Straight lines with outgoing arrows are output data
flows
 Labels are assigned to Data flow. These aid
documentation

5
08-02-2022

Data Stores
D1 Data Stores D1 Data Stores D1 Data Stores
Writing Reading

 A Data Store is a repository of data


 Data can be written into the data store. This is
depicted by an incoming arrow
 Data can be read from a data store. This is depicted
by an outgoing arrow
 External entity cannot read or write to the data store
 Two data stores cannot be connected by a dataflow

How to find each one…


• External Entities (EE): noun
• people/organizations/things that supply information to or use
information from the system
• Processes (P): verb/verb phrase
• actions/doing words
• Data Flows (DF): name of data
• movement/exchange of information/data between external entities to
processes, and processes to processes
• Data Stores (DS): noun
• store/record information/data

12

6
08-02-2022

Notations of DFD
DE MARCO & YOURDON NOTATIONS

External Entity

Data Flow

Process

Data Store

13

Notations of DFD
GANE & SARSON NOTATIONS (more universal)

External Entity

Data Flow

Process

Data Store

14

7
08-02-2022

Rules of DataFlow
 Data can flow from  Data cannot flow from

 External entity to process  External entity to


 Process to external entity external entity
 Process to store and back  External entity to store

 Process to process  Store to external entity


 Store to store

Rules in DFD Building


• Rule 1 : Use only DFD notations to avoid confusion

• Rule 2 : Use an action VERB to label a process (because a process is an


action !!!)

16

8
08-02-2022

Rules in DFD Building ...


• Rule 3 : Must be one process associated with each
data flow …

17

Rules in DFD Building ...


• Rule 3 : Must be one process associated with each
data flow …

M N

M N

18

9
08-02-2022

Rules in DFD Building ...


• Rule 3 : Must be one process associated with each
data flow.

19

Rules in DFD Building ...


• Rule 4 : Shaded corner must appear in ALL occurrences
of a duplicated symbol in a same diagram

CUSTOMER D3 Accounts Receivable

CUSTOMER
D3 Accounts Receivable

20

10
08-02-2022

Rules in DFD Building ...


• Rule 5 : No process without output data flow (black
hole !!!)

21

Rules in DFD Building ...


• Rule 6 : No process without input data flow (miracle
!!!)

22

11
08-02-2022

Rules in DFD Building ...


• Rule 7 : No need for routing (without transforming) a data flow with a
process (non value-added activities !!!)

Info A Info A

23

Rules in DFD Building ...


• Rule 8 : Data flows cannot split …

24

12
08-02-2022

Rules in DFD Building ...


• Rule 9 : A data packet can combine many data
elements being transmitted at the same time to the
same destination

25

Rules in DFD Building ...


• Rule 10 : Double-headed arrows are forbidden [in-
flow (update) and out-flow (extract info) of a data
store are different]

26

13
08-02-2022

Example for finding each one…

• A student (EE/DS) sends in an application form (DF) containing


their personal details, and their desired course . The university
(EE) checks (P) that the course (EE/DS) is available. If the
course is available and the student is enrolled (P) in the course,
the university confirms (P) the enrolment by sending a
confirmation letter (DF) that they are registered (P) for the
course to the student. Or if the course is unavailable the
student is sent a rejection letter (DF).

27

Guidelines for Developing DFD


1. Develop a list of business activities
• Similar to business rules of ERD
2. Create the Context Diagram (first task)
• shows external entities and data flows to and from the
system: conceptual DFD
3. Create level 0 DFD (or Diagram 0)
• shows general processes at the highest level
4. Create level 1 DFD (or Child Diagram)
― shows more detailed processes
5. Create level n-1 DFD…..

28

14
08-02-2022

Context Diagram Building Procedure


• Identify the system and its boundaries (the context)
• Identify external entities (providers, receivers of
system info)
• Identify external data flows (input, output)
• However, NO DATA STORE !!!
• Note: the whole system itself is a process (it receives
input and transforms into output)

29

Good Style in DrawingDFD


 Use meaningful names for data flows, processes and
data stores.
 Use top down development starting from context
diagram and successively levelling DFD
 Only previously stored data can beread
 A process can only transfer input to output. It cannot
create new data
 Data stores cannot create newdata

15
08-02-2022

Why LevelDFD
 If a DFD is too detailed it will have too many
data flows and will be large and difficult to
understand
 Start from a broad overview. Expand to details –
Idea similar to using procedures and linking
these with a main program
 Each DFD must deal with one aspect of a big
system

Decomposition of DFDs
 A system is too complex to be shown on a single DFD.
 Decomposition is the iterative process of exploding
data flow diagrams to create moredetail.
 Level 0 data flow diagrams may be exploded into
successive low levels of detail. The next level of detail
would be a level 1 data flow diagram.
 The DFDs become linked together in
a hierarchy, which would fully
document the system.

16
08-02-2022

Decomposition of Context Diagram


M
0
P Context Diagram
N

M D1 Level-0 Diagram
1 2
P

3
N Level-1 Diagram

33

Levels of DFD
Context diagram

 Level-0 diagram (System diagram)

 Level-n diagram
- Detail of one process from next
highest level

 Primitive diagram (Lowest level DFD)

17
08-02-2022

Levelling Rules
 If a process p is expanded, the process at the next level
are labelled as p.1, p.2 etc.
 All data flow entering or leaving p must also enter or
leave it’s expanded version
 Expanded DFD may have data stores
 No external entity can appear in expandedDFD
 Keep the number of processes at each level less than 7

Balancing DFDs
 Information presented at one
level of a DFD is accurately
represented in the next level
DFD.
 Ensures that the input and
output data flows of the
parent DFD are maintained
on the child DFD.

18
08-02-2022

Creating DFDs
 Create a preliminary Context Diagram.
 Identify Use Cases, i.e. the ways in which users most
commonly use the system.
 Create DFD fragments for each use case.
 Create a Level 0 diagram from fragments.
 Decompose to Level 1,2,…
 Validate DFDs with users.

Description of Each Level


• Context Diagram: This is the highest level and represents the overall
system and its interaction with its environment
• Level 0 Diagram: This shows the major subsystems and their
interactions
• Level x Diagram: Shows the processes that make up each of the major
subsystems

19
08-02-2022

Creating the Context Diagram


 Draw one process representing
the entire system (process 0)
 Find all inputs and outputs that
come from or go to external
entities; draw as data flows.
 Draw in external entities as the
source or destination of the
data flows.

Creating Level 0 Diagram


 Combine the set of
DFD fragments into
one diagram.
 Generally move from
top to bottom, left to
right.
 Minimize crossed lines.

20
08-02-2022

Creating Level 1 Diagram


 Each use case is turned into its own DFD.
 Take the steps listed on the use case and depict
each as a process on the level 1 DFD.
 Inputs and outputs listed on use case become data
flows on DFD.
 Include sources and destinations of data flows to
processes and stores within the DFD.
 May also include external entities for clarity.

When to stopdecomposing
DFDs?
Ideally, a DFD has at least
three levels.
When the system becomes
primitive i.e. lowest level
is reached and further
decomposition is useless.

21
08-02-2022

Validating DFD

 Check for syntax errors to


assure correct DFD structure.
 Check for semantics errors to
assure accuracy of DFD
relative to actual/desired
system.

DFD for University Admission System


Context Diagram

Student Report
Information 0 Request

Student Universi Staff


ty
Admissi
on
Admission Repo
System
Approval or rt
Rejection

22
08-02-2022

Level 0

Student Report
Informati Request
Student
on Name &
1 3 Data
ID Item
Admission Perform Genera Prompt
Student Approval or Staff
Intake te Dat
Rejection Procedu Dat Report a
re a s Item
Prior Quer s Repo
Approve Applicati y Dat rt
d on Data a
Applicati D1 Student
on Data
Verified
Approve
2 d
Applicati
Maintain on
Student Other Student
Informati Data
on Request for
Student Information
Maintenance

Level 1 Process 1, Perform Intake Procedure

Student
Informati
on Admission
1.1 1.2
Application
Student Receive Verify
Admissio Student Admissio
n Name n
Applicati and ID Applicati
on on
Verified
Prior Admissio
Applicati D1 Student n
on Data Data Applicati
Applicati on
Applicati on
on Data
Reques 1.3
Application
t
Approval or Approved
Rejection Review
Application
Admissio
n
Applicati
on

23
08-02-2022

Level 1 Process 2, Maintain Student


Information

Approved 2.2
Application
to Add Add
New
Studen Verified
t Verified Approved
2.3 Changed Application
Student
Approved Approved Application Edit Data
Application 2.1 to Edit Existing
Request for Determi ID of Student D1 Student Data
Student Information ne Student
Maintenance 2.4
Operati to Delete
on Delet Verified ID
e of Student to
Existin Delete
g 2.5
Stude
Determination
nt Cancel
to Cancel Operati
Operation on

DFD for Lemonade Stand


Context Diagram

Sales Forecast
Order 0.0
CUSTOME Lemona Production EMPLOYE
R
Product de Schedule E
Served System Pay
Payment
Received Time Worked
Goods
Payment
Purchase
Order
VENDOR

24
08-02-2022

Level 0

1.0
Sal
Customer e Sales
Order Forecast
Product
Ordered Payment
2.0 Producti
CUSTOME EMPLOY
Producti on
R Product EE
on Schedul
Served
Received Invento e
Goods ry
3.0
VENDOR Procur Order
Purchase e- Decisio
Order ment ns
Payment Pa Time
y Worked
4.0
Payro
ll

Level 1, Process1

CUSTOM
ER
Customer
Order Request for
ORDE
R Forecast
1.1
Recor
d 1.3
Order Produc
Severed e
Payme Order Sales
Sales
Foreca
nt Forecast
st
1.2
Receiv PAYME
e NT
Payme
nt

25
08-02-2022

Level 1, Process 2 and Process3

Order
Product PURCHA
Decision 3.1 SE
Order Produc
ORDE ORDER
R e
2.1 Purcha Quantity On-Hand
Serve Quantity se RAW
Produ Quanti
Severed Order MATERIA
ct
RAW
Receiv Receiv
ty LS
Producti ed ed
MATERIA
on LS Goods 3.2
Schedul 2.2 Recei
e Produc Quantity ve
Items RECEIV
e Used ED
Produc Payment ITEMS
t INVENTOR
Production TY Approval
Data VENDO
3.3 R
2.3 Quantity Pay
Store Vend
Produced & or
Produ
Location Stored
ct
Payme
nt

Level 1, Process4

Time
Worked
4.1 TIME
Recor CARDS
d
Time Employee ID
Worke
EMPLOY
d
EE
Payroll
Request
4.2 Unpaid time
Calcula
te
cards
Payroll PAYRO
LL
Payment
Approval
4.3
Pay
Emplo
ye e PAYMEN
TS
Payme
nt

26
08-02-2022

1.1 1.2
1.0
Process Decomposition
Recor Receiv
Sal
d e
e
Order Payme
nt

2.1 2.2 2.3


2.0
Serve Produc Store
Producti
Produ e Produ
on
ct Produc ct
t
0.0
Lemona
de 3.1
System 3.0 3.2 3.3
Produc
Procur Recei Pay
e
e- ve Vend
Purcha
ment Items or
se
Order

4.1 4.3
4.2
4.0 Recor Pay
Calcula
Payro d Emplo
te
ll Time ye e
Payroll
Worke
d

Context Level Level 0 Level 1

Logical and PhysicalDFD


 DFDs considered so far are called logical DFDs
 A physical DFD is similar to a document flow diagram
 It specifies who does the operations specified by the
logical DFD
 Physical DFD may depict physical movements of the
goods
 Physical DFDs can be drawn during fact gathering
phase of a life cycle

27
08-02-2022

Physical DFD for ChequeEncashment


Cas
h

Toke
n
Clerk
Chequ Cashier
Verify A/C
CUSTOM Verify Token
e Signature Cheque Take
ER Update
with Token Signature
Toke Balance
number
n

Bad
Cheque
Customer Store Entry in Day
Accounts cheques Book

Logical DFD for ChequeEncashment


Cheque
Retriev Chequ Check Store
with
e e Balance, Token no
Token
Custom Issue &
er token cheques
Record
Customer Token Store
Chequ Accounts
Slip or cheques
e
Cheque

Update
CUSTOME Search
Daily
R & match
boo
cash
Token token Chequ
k
Slip e with
token
Entry in
Cas Day
Book
h

28
08-02-2022

In a DFD external entities are represented by a


a. Rectangle
b. Ellipse
c. Diamond shaped box
d. Circle
 External Entities may be a
a. Source of input data only
b. Source of input data or destination of results
c. Destination of results only
d. Repository of data
 A data store in a DFD represents
a. A sequential file
b. A disk store
c. A repository of data
d. A random access memory

By an external entity we mean a


a. Unit outside the system being designed which can be controlled by an analyst
b. Unit outside the system whose behaviour is independent of thesystem being
designed
c. A unit external to the system being designed
d. A unit which is not part of DFD
 A data flow can
a. Only enter a data store
b. Onlyleave a data store
c. Enter or leave a datastore
d. Either enter or leave a data store but not both
 A circle in a DFD represents
a. A data store
b. A an external entity
c. A process
d. An input unit

29
08-02-2022

EXAMPLE

DFD Naming Guidelines

• External Entity  Noun


• Data Flow  Names of data
• Process  verb phrase
• a system name
• a subsystem name

• Data Store  Noun

30
08-02-2022

Creating Data Flow Diagrams


Lemonade Stand Example

Creating Data Flow Diagrams


Example Steps:
The operations of a simple 1. Create a list of activities
lemonade stand will be used
• Old way: no Use-Case Diagram
to demonstrate the creation
of dataflow diagrams. • New way: use Use-Case Diagram
2. Construct Context Level DFD
(identifies sources and sink)
3. Construct Level 0 DFD
(identifies manageable sub processes )
4. Construct Level 1- n DFD
(identifies actual data flows and data stores )

31
08-02-2022

Creating Data Flow Diagrams


Example 1. Create a list of activities

Think through the activities


that take place at a lemonade
stand.
Customer Order
Serve Product
Collect Payment
Produce Product
Store Product

Creating Data Flow Diagrams


Example 1. Create a list of activities

Also think of the additional


activities needed to support
the basic activities.
Customer Order
Serve Product
Collect Payment
Produce Product
Store Product
Order Raw Materials
Pay for Raw Materials
Pay for Labor

32
08-02-2022

Creating Data Flow Diagrams


Example 1. Create a list of activities

Group these activities in


some logical fashion,
possibly functional areas.
Customer Order
Serve Product
Collect Payment

Produce Product
Store Product

Order Raw Materials


Pay for Raw Materials

Pay for Labor

Creating Data Flow Diagrams


Example 2. Construct Context Level DFD
(identifies sources and sink)
Create a context level
diagram identifying the Context Level DFD
sources and sinks (users).
Sales Forecast
Order 0.0
CUSTOMER Lemonade Production Schedule EMPLOYEE
Customer Order Product Served System Pay
Serve Product Payment Time Worked
Collect Payment Received Goods
Payment
Purchase Order
Produce Product
Store Product VENDOR

Order Raw Materials


Pay for Raw Materials

Pay for Labor

33
08-02-2022

Creating Data Flow Diagrams


Example 3. Construct Level 0 DFD
Create a level 0 diagram (identifies manageable sub processes )
identifying the logical Level 0 DFD
subsystems that may exist.
1.0
Sale
Customer Order Sales Forecast
Customer Order
Product Ordered
Serve Product
Payment
Collect Payment 2.0 Production
CUSTOMER EMPLOYEE
Production Schedule
Product Served
Produce Product
Inventory
Store Product Received Goods
3.0
VENDOR Procure- Order
Purchase Order
Order Raw Materials ment Decisions
Pay for Raw Materials Payment
Pay Time Worked

Pay for Labor 4.0


Payroll

Creating Data Flow Diagrams


Example 4. Construct Level 1- n DFD
Create a level 1 (identifies actual data flows and data stores )
decomposing the processes Level 1 DFD
in level 0 and identifying
CUSTOMER
data stores.
Customer Order
Request for Forecast
Customer Order ORDER

Serve Product 1.1


Record
Collect Payment Order 1.3
Produce
Severed Order Sales
Produce Product Payment Forecast
Sales Forecast
Store Product
1.2
Receive PAYMENT
Payment
Order Raw Materials
Pay for Raw Materials

Pay for Labor

34
08-02-2022

Creating Data Flow Diagrams


Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the processes Level 1 DFD
in level 0 and identifying
Product Order
data stores.
ORDER
Customer Order 2.1
Serve
Serve Product Product
Quantity Severed

Collect Payment RAW


Production
MATERIALS
Schedule
Produce Product 2.2
Store Product Produce
Product
Quantity Used

INVENTORTY
Order Raw Materials Production Data
Pay for Raw Materials
2.3 Quantity Produced &
Store Location Stored
Pay for Labor Product

Creating Data Flow Diagrams


Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the processes Level 1 DFD
in level 0 and identifying Order Decision
PURCHASE
data stores. 3.1 ORDER
Produce
Purchase
Customer Order Order Quantity On-Hand
Serve Product RAW
Quantity MATERIALS
Collect Payment Received Received
Goods
3.2
Produce Product Receive
Items
Store Product RECEIVED
ITEMS
Payment Approval
Order Raw Materials
VENDOR
Pay for Raw Materials 3.3
Pay
Vendor
Pay for Labor
Payment

35
08-02-2022

Creating Data Flow Diagrams


Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the processes Level 1 DFD
in level 0 and identifying Time Worked

data stores. 4.1 TIME CARDS


Record
Time
Customer Order Worked Employee ID
Serve Product EMPLOYEE
Collect Payment
Payroll Request
4.2 Unpaid time cards
Produce Product Calculate
Payroll
Store Product PAYROLL

Payment Approval
Order Raw Materials
4.3
Pay for Raw Materials Pay
Employe
e PAYMENTS
Pay for Labor
Payment

Process Decomposition
1.1 1.2
1.0
Record Receive
Sale
Order Payment

2.1 2.2 2.3


2.0
Serve Produce Store
Production
Product Product Product

0.0
Lemonade
System 3.1
3.0 3.2 3.3
Produce
Procure- Receive Pay
Purchase
ment Items Vendor
Order

4.1 4.3
4.2
4.0 Record Pay
Calculate
Payroll Time Employe
Payroll
Worked e

Context Level Level 0 Level 1

36
08-02-2022

DFD Example: Bus Garage Repairs


• Buses come to a garage for repairs.
• A mechanic and helper perform the repair, record the
reason for the repair and record the total cost of all
parts used on a Shop Repair Order.
• Information on labor, parts and repair outcome is
used for billing by the Accounting Department, parts
monitoring by the inventory management computer
system and a performance review by the supervisor.

DFD Example: Bus Garage Repairs (cont’d)

• External Entities: Bus, Mechanic, Helper, Supervisor, Inventory


Management System, Accounting Department, etc.
• Key process (“the system”): performing repairs and storing
information related to repairs
• Processes:
• Record Bus ID and reason for repair
• Determine parts needed
• Perform repair
• Calculate parts extended and total cost
• Record labor hours, cost

37
08-02-2022

DFD Example: Bus Garage Repairs


(cont’d)
• Data stores:
• Personnel file
• Repairs file
• Bus master list
• Parts list
• Data flows:
• Repair order
• Bus record
• Parts record
• Employee timecard
• Invoices

Bus Garage Context Diagram


Bus

Mechanical Fixed
problem mechanical
to be repaired problems

Repair Supervisor
Helper Labor Bus summary
Repair
Process List of
System parts used Inventory
Labor Management
Labor, System
parts cost
details
Mechanic

Accounting

38
08-02-2022

CSUB Burger’s Order Processing System

• Draw the CSUB Burger’s context diagram


• System
• Order processing system

• External entities
• Kitchen
• Restaurant
• Customer

• Processes
• Customer order
• Receipt
• Food order
• Management report

39

You might also like