You are on page 1of 33

Module II

Structured Analysis
and DFD

Dr. Ajanta Das


Professor,
AIITK
Amity University, Kolkata
Structured Analysis

Software Engineering Ajanta Das 2


When DFD is Used

 Life Cycle Phases  Analysis (What do we do?)


 Planning  Fact finding
 investigate business process
 Feasibility Study and the current system
 Analysis  modelling the current
and required systems
 Design  deliverables -
 Code and Unit  requirements specification
test  logical models of the
required system

Software Engineering Ajanta Das 3


Data Flow Diagrams (DFD)
 DFDs describe the flow of data or
information into and out of a
system
 what does the system do to the
data?
 A DFD is a graphic representation of
the flow of data or information
through a system

Software Engineering Ajanta Das 4


Elements of DFD
 external entity - people or organisations that
send data into the system or receive data from
the system
 process - models what happens to the data
i.e. transforms incoming data into outgoing
data
 data store - represents permanent data that
is used by the system
 data flow - models the actual flow of the data
between the other elements

Software Engineering Ajanta Das 5


Notations Used

Data Flow
• Data Flow

• Process
External Entity
• External Entity

• Data Store D Data Store

Software Engineering Ajanta Das 6


Levelled DFDs

Software Engineering Ajanta Das 7


Level 0 - Context Diagram
 models system as one process box
which represents scope of the
system

 identifies external entities and


related inputs and outputs

 Additional notation - system box

External Data flow out System box


entity
Data flow in
Software Engineering Ajanta Das 8
Level 1 - overview diagram
 gives overview of full system

 identifies major processes and data flows


between them

 identifies data stores that are used by the


major processes

 boundary of level 1 is the context


diagram

Software Engineering Ajanta Das 9


Level 2 - detailed diagram
 level 1 process is expanded into
more detail

 each process in level 1 is


decomposed to show its constituent
processes

 boundary of level 2 is the level 1


process

Software Engineering Ajanta Das 10


Rules for DFDs
 Numbering
 Labelling
 Balancing

Software Engineering Ajanta Das 11


SYMBOLS USED IN DFD

DATA STORES

Inventory 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 data flow

Software Engineering Ajanta Das 12


RULES OF DATA FLOW

Software Engineering Ajanta Das 13


DATA FLOW DIAGRAMS

An alternate notation is often used

3 Label
A Process
Store
Issue Name

A Data store DS1 Inventory Name

Label

Software Engineering Ajanta Das 14


GOOD STYLE IN DRAWING DFD

 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 be read
A process can only transfer input to output.It
cannot create new data
 Data stores cannot create new data

Software Engineering Ajanta Das 15


DESCRIBING A SYSTEM WITH A DFD

 An entire system is represented by one DFD which


gives the system’s overview
 It is called a context diagram
It gives little detail & is also known as the top level
DFD
Context diagram of mess management is shown in
the next transparency

Software Engineering Ajanta Das 16


Numbering
 On level 1 processes are numbered 1,2,3…
 On level 2 processes are numbered x.1, x.2,
x.3… where x is the number of the parent
level 1 process
 Number is used to uniquely identify process
not to represent any order of processing
 Data store numbers usually D1, D2, D3...

Software Engineering Ajanta Das 17


LEVELLING RULES

If process p is expanded, the process at the next


level are labeled as p.1,p.2 etc.

All data flow entering or leaving p must also enter or


leave its expanded version

 Expanded DFD may have data stores

 No external entity can appear in expanded DFD

Keep the number of processes at each level


less than 7
Software Engineering Ajanta Das 18
ILLEGAL CONSTRUCTS IN DFD

 No loops are allowed in DFD

 A process cannot be a pure decision

Actual rate > Standard ra


Actual daily rate
Compare

Standard daily rate Actual rate <= Standard ra

 A single data flow should not be split into many


flows with different labels

 No data flow allowed between data stores


Software Engineering Ajanta Das 19
ILLEGAL CONSTRUCTS IN DFD

Record
Get students Calculate
extra/rebates Bill
record Ask for next record

Extra/rebate store
• Not correct as loop is formed

Software Engineering Ajanta Das 20


Labelling
 Process label - short description of
what the process does, e.G. Price order
 Data flow label - noun representing the
data flowing through it e.G. Customer
payment
 Data store label - describes the type of
data stored
 Make labels as meaningful as possible

Software Engineering Ajanta Das 21


Balancing and data stores
 Balancing
 any data flows entering or leaving a
parent level must by equivalent to
those on the child level
 Data stores
 data stores that are local to a process
need not be included until the process
is expanded

Software Engineering Ajanta Das 22


Data Flows
 Allowed to combine several data
flows from lower level diagrams at a
higher level under one data flow to
reduce clutter
 Flows should be labelled except
when data to or from a data store
consists of all items in the data
store

Software Engineering Ajanta Das 23


CONTEXT DIAGRAM OF MESS MANAGEMENT SYSTEM

Extras Note
Students Vendors
Requisitions
Payments
Payments Supplies
Mess
Bills Management Mess secretary
Daily rate
System
Menu
Perishable
Items Item needed
Each day Overdue Bills
Mess manager Overdue Chief warden
Payments

• Observe this diagram gives very little detail

Software Engineering Ajanta Das 24


EXPANDED DFD FOR HOSTEL MESS MANAGEMENT

Mess
Students Secretary Chief Warden

Payments Update daily


rate Unpaid bills

Itemized bills at end 1 Items used each


of month Billing day
system
Extras/Rebates
Student billing
Expenses Information + bills
No of meals Mess manager
(today +3)
• Going to next process (Continued in next slide)

Software Engineering Ajanta Das 25


EXPANDED DFD FOR HOSTEL MESS MANAGEMENT

•Continued Low stock (today+2)

Items to be issued
2 (today +2)
Vendor suppliesStores issue Mess
Vendors
Order non-
and Items used Manager
Control today
perishable system
Menu
(today +2)
Vendor data
Stores
inventory
Order data Mess
Secretary
Perishable order 3 Vegetables and perishable
Perishable requisition
Orders ordering
Vendor data
(perishable)
(perishable)

Software Engineering Ajanta Das 26


EXPANDED DFD-BILLING SYSTEM

Payments
Itemized 1.2
bills Calculate Unpaid
Bills 1.3 bills Chief
Mess Student’s
bills Reconcile warden
Secretary
payments
Students data
Extras/Rebates Students data
Daily rate average
1.4 (upto date)
Find no 1.1
Of meals Calculate
No of meals to cook Daily rate
(today + 2)
Expenses data
Mess
Students data Manager Items rate data
• Observe numbering of processes

Software Engineering Ajanta Das 27


LEVELLING EXAMPLES
Low stock
item No of meals
(today to be cooked
Mess manager (today +2)
+2)Items to be
used on
(today +2)
Items issued

Low message stock


2
Stores issue
Order for Mess secretary
and
items Menu for
control system
(Today +2)
Vendor supplies

Order

Stores inventory Vendor


Vendor

Stores issue control system process

Software Engineering Ajanta Das 28


LEVELLING EXAMPLES

2.1
2.2
Inventory update
Mess manager Create order
And
Items usedlow stock warning Low stock for vendor

today item
Items
needed
From 2.2

Vendor Stores inventory Order Vendor data


supplies
Vendor
Order to
vendor
2.3 2.4
Calculate Items Check Item
needed availability
Mess secretary Items Low stock
Menu
(today +2) needed items
No of meals Stores (today+2)
to (today inventory
+2)

Software Engineering Ajanta Das 29


LEVELLING EXAMPLES
Top
Ext A Ext B
Level process

Ext A 1 2 4 Ext B

F1 F4

Process Process
1 2
Ext A 1.1 1.2 1.4 2.1 2.2 2.3

F1

1.3

3.1 3.2 3.4 Ext B 4.3 4.1 4.2

F4

3.3

Software Engineering Ajanta Das 30


LOGICAL AND PHYSICAL DFD

 DFD’S 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
Software Engineering Ajanta Das 31
PHYSICAL DFD FOR ENCASHING CHEQUE

Cash

Toke
n Clerk
Verify A/C Cashier
Signature Verify Token
Customer Cheque Update Cheque withTake Signature
Token Balance Token number

Store cheques Entry in


Day Book
Bad Cheque

Customer
Accounts

Software Engineering Ajanta Das 32


LOGICAL DFD FOR CHEQUE ENCASHMENT

Check Cheque with


Retrieve Store
Balance, Token
Customer Cheque Token no
Issue
Record & cheques
token

Token Slip Cheque store


Or cheque With token no.
Cheque Customer
accounts
Search Update
Customer & match Daily
token Cheque with
cash book
token
Token Slip Day book
Cash

Software Engineering Ajanta Das 33

You might also like