You are on page 1of 34

Data Flow Diagram

Dr. Engr. Sami ur Rahman


What is a Data Flow Diagram?

 Known as DFDs
 A way to model a real world situation
 They are the interface between the real world activities and an
understanding of how this can be converted into a computer system.

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 2
Why do we use DFDs?

 It is a way of taking the physical view and converting it into a logical view.
 The physical view - all documents involved
 The logical view - the data they contain
 Their main purpose is to communicate with the user, the analyst’s
understanding of the scope of the required system

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 3
Decomposition and Abstraction

 Decomposition - Divide and subdivide into manageable size problems


 Abstraction - Concentrate on the important issues and ignore the
irrelevant

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 4
The Elements

The four main elements of DFDs notation


· Data Flows, with a label to indicate what data is flowing
· Processes, that handle the data
· Data stores, within the system (diary, filing cabinet or computer file)
· Outside entities, outside sources of data

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 5
DFD Naming Guidelines

 External Entity  Noun


 Data Flow  Names of data
 Process  verb phrase
 a system name
 a subsystem name
 Data Store  Noun

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 6
Levelling

 DFDs are expanded or decomposed into levels.


 Separating each process into sub processes
 Uncovers more and more detail

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 7
The Levels

 Context - Overview - contains only one process


 Level 1 - Utilises all four elements
 Level 2 - A breakdown of a level 1 process
 Level 3 - A breakdown of a level 2 process
 There is no rule as to how many levels of DFD that can be used.

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 8
Data Flow Diagrams Symbols

System – a group of interrelated procedures


Source/ used for a business function, with an
Sink identifiable boundary, working together for
some purpose.
Analysis – separation of a whole into its
component parts
0.0
Process Design – to create or construct according to
plan

Physical Data Flow Diagrams – show how


DATA STORE the current system flows

Data Flow Lines Logical Data Flow Diagrams – show the data
flow, structure, and requirements of a new
system
Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 9
Data Flow Diagrams Symbols

Source/Sink – help to establish the


Source/ boundaries of the system. A source identifies
Sink the origin of data inflow to the system. A sink
identifies the outflow of a system, many times
as information.
Sometimes referred to an entity, a source
0.0 may be a customer, vendor, employee, or
Process
even another system. A single entity can be
both a source and a sink.

DATA STORE

Data Flow Lines

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 10
Data Flow Diagrams Symbols

Processes – are the activities (manual and


Source/ automated) that transform the inputs,
Sink transport data from process to process,
stores the data, and produce the outputs of a
system.
Processes are used on every DFD starting
0.0 with an over all process on the context level
Process
diagram, the system. The system is then
decomposed until a primitive level is
obtained. The primitive level is the point in
DATA STORE which the relevant activities of a process are
identified.

Data Flow Lines

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 11
Data Flow Diagrams Symbols

Data Store – is the resting place of the data


Source/ in a system. A data store can be in the form
Sink of paper, a disk file or any other media.
Normally the word ‘data’ does not appear in
the title of a data store. Some examples of
data stores are Customer Order, Payment,
0.0 Invoice, Time Card……
Process

DATA STORE

Data Flow Lines

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 12
Data Flow Diagrams Symbols

Data Flow – is the data in motion. Data can


Source/ move from the outside (source) into a
Sink process. Once the inside of a system data
must flow from place to place through a
process, the flow lines show this movement.
The lines are labeled to provide clarity and
0.0 meaning to the data moving through the
Process
system.

DATA STORE

Data Flow Lines

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 13
Creating Data Flow Diagrams

Steps:

1. Create a list of activities


2. Construct Context Level DFD
(identifies external entities and processes)
3. Construct Level 0 DFD
(identifies manageable sub process )
4. Construct Level 1- n DFD
(identifies actual data flows and data stores )
5. Check against rules of DFD

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 14
Data Flow Diagrams Levels
Context Level DFD

Source/ Source/ Sink


Data Flow 0.0
Source/ Sink
Process
Sink Data Flow
Data Flow

Level 0 DFD
0.0
1.0
Process Process
Data Flow Data Flow
Data Flow

DATA STORE 2.0


Source/ Sink Source/ Sink
Process
Data Flow Data Flow

Data Flow
Data Flow Lines
3.0
Process Data Flow

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 15
Data Flow Diagrams Levels

Source
Level 1 DFD (and on)
Data Flow
Source/
Sink

1.1
DATA STORE
Process

0.0
Process Source
1.2
Data Flow Process

DATA STORE

Data Flow
Data Flow Lines
Sink

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 16
Examples
Creating Data Flow Diagrams Lemonade Stand Example

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 17
Creating Data Flow Diagrams

Example Steps:

1. Create a list of activities


The operations of a
2. Construct Context Level DFD
simple Juice stand will be
(identifies sources and sink)
used to demonstrate the
creation of dataflow 3. Construct Level 0 DFD
diagrams. (identifies manageable sub processes )
4. Construct Level 1- n DFD
(identifies actual data flows and data stores )

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 18
Creating Data Flow Diagrams

Example
1. Create a list of activities
Think through the
activities that take place
at a juice stand.
Customer Order
Serve Product
Collect Payment
Produce Product
Store Product

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 19
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

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 20
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

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 21
Creating Data Flow Diagrams

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

Order Raw Materials


VENDOR
Pay for Raw Materials

Pay for Labor


Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 22
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

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 23
Example
4. Construct Level 1- n DFD
Create a level 1 (identifies actual data flows and data stores )
decomposing the Level 1 DFD
processes in level 0 and
CUSTOMER
identifying data stores.
Customer Order
Request for Forecast
Customer Order ORDER
1.1
Serve Product 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


Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 24
Example
4. Construct Level 1 (continued)
Create a level 1
decomposing the Level 1 DFD
processes in level 0 and
Product Order
identifying data stores.
ORDER
Customer Order 2.1
Serve Quantity Severed
Serve Product Product
Collect Payment RAW
Production
MATERIALS
Schedule
Produce Product 2.2
Store Product Produce Quantity Used
Product

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

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 25
Example
4. Construct Level 1 (continued)
Create a level 1
decomposing the Level 1 DFD
processes in level 0 and Order Decision
PURCHASE
identifying data stores. 3.1 ORDER
Produce
Purchase
Customer Order Order Quantity On-Hand
Serve Product Quantity
RAW
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
Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 26
Example
4. Construct Level 1 (continued)
Create a level 1
decomposing the Level 1 DFD
processes in level 0 and Time Worked

identifying 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
Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 27
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


Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 28
DFD Example: Bus Garage Repairs

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 29
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.

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 30
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

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 31
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

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 32
Hairdressing Salon Level 1
Physical DFD
1 Receptionist
New client
Register details
Appointment
Existing client
Appointment details
details M1 Client card index
Confirmation
Request Appointment
details
Confirmation
Details
M2 Appointment diary

Confirmation of
a
arrival
Client Appointment
details 2 Receptionist

(Lejk & Deeks) Confirm Appointment Change of


arrival details
hairstyle etc.

Change of
hairstyle etc.
3 Hairdresser/Rcptnst
(Lejk & Deeks)

Conduct
appointment

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 33
Thank You !!!

Stratford University | School of Computer Science & Information Technology | Dr. Engr. Sami ur Rahman 34

You might also like