Unit 2 Analysis Tools
Unit 2 Analysis Tools
3. Decision Tables
4. Decision Tree
5. Structured English
2
1. Data Flow Diagram (DFD):-
Data Flow Diagrams are widely used
graphic tools for describing the movement of
data within or outside the system.
DFD consist of a series of bubbles joined by
lines, it is also known as a ‘Bubble Chart’.
DFD was first developed by “Larry
Constantine” as a way of expressing system
requirements in a graphical form. This led to
modular design. There may be a single DFD
for entire system or it may be exploded into
various levels, namely Level’0, level 1, level 2,
3
level 3.
Context level contains a single process and
it shows an overall view of the system.
Further we can explore DFD accordingly.
DFD quickly convey to both the software
developer and the user, how the current
system is working and how the proposed
system will work. The main advantage of
DFD is that they are easily understood by
the users, and hence user can suggest
modifications in the proposed system.
4
Data modeling Notation
External Entity
Data Flow
Process
Data store
5
There are four symbols:-
1. Square- Square defines a source or
destination of system data.
2. Arrow- An arrow identifies data flow in
motion. It is as a pipeline through which
information flows.
3. Circle- Circle represents the process that
transforms incoming data flow into
outgoing data flow.
4. Open Rectangle- Open rectangle shows the
data temporarily to store. 6
There are two types of DFDs-
Physical and Logical DFD
• Physical DFD:- The Data Flow Diagram
which represent the model of the current
system, are known as physical DFD. These
DFDs are constructed for the existing system
• Logical DFD:- The Data Flow Diagrams
which represent the model of the proposed
system, are known as logical DFD, these
DFDs are constructed for the system which
user is going to construct. 7
Making a DFD
Several rules are used in making DFD:
1. Arrow should not cross each other.
2. Squares, circles, and files must bear names.
3. No two data flows, squares, or Circles can have
the same name.
4. Choose meaningful names for data flows,
processes, and data stores.
5. Control Information such as record counts,
passwords, and validations requirements are not
relevant to a data flow diagram.
6. The direction of flows should be from top to
bottom and from left to right. 8
Advantages of data flow diagram:
1. A simple graphical technique which is
easy to understand.
2. It helps in defining the boundaries of
the system.
3. It is useful for communicating current
system knowledge to the users.
4. It is used as the part of system
documentation file.
5. It explains the logic behind the data
flow within the system. 9
Disadvantages of data flow diagram:
1. Data flow diagram undergoes lot of alteration
before going to users, so makes the process
little slow.
2. Physical consideration are left out.
3. It make the programmers little confusing
towards the system.
4. DFDs for large systems can become
cumbersome, difficult to translate and read, and
be time consuming in their construction.
5. Data flow can become confusing to
programmers, but DFDs are useless without the
prerequisite detail
10
0’ Level DFD or context level DFD
Library
User Mgmt.
system
11
Q.1 Make a DFD for MCD software.
Employee MCD
12
1’ Level DFD or context level DFD
Add
Book.dat
13
Data Dictionary
Data dictionary is storehouse of data giving
information about data. It is a list of terms
and their definition for all data items and data
files of a system.
Data dictionary is a valuable reference in any
organization.
Data Structure
Hierarchy of Data
16
It is suggested that you include:-
• The name of the item.
• Description or purpose.
• Data type, (alphabetical, numeric, decimal).
• Data length (number of characters including
spaces, or decimal points).
• Mandatory characters.
• Display (0 or 2 decimal places).
• Examples and often statements about where
each data element appears within the data
modeling. 17
Advantages of Data Dictionary:-
• A data dictionary has many advantages. The
most obvious is documentation, it is a
valuables reference in any organization.
• It also control information maintained for
each data element is cross-referenced in the
data dictionary.
• It assists in communication meaning of
different elements, terms and procedures.
• It helps the analyst to record the details of
each element and data structure. 18
Example of Data Dictionary
Student
Attribute Data type Minimum Maximum Description
Length Length
Stores
Name Char 5 20 student’s name
19
Process Descriptions
This is after defining all the data elements
and data structures in the data dictionary, the
system analyst begins to describe the
processes. Process descriptions are the tools
for documenting the procedure and
describing the system logic.
The commonly used process description
tools are:
1. Structured English
2. Decision Tree
3. Decision Table 20
Decision Tree
Decision Trees are useful tools for helping
you to choose between several course of
action. they provide a highly effective
structure within which you can explore
options, and investigate the possible
outcomes of choosing those options.
In other words:
21
A decision tree is one of the most systematic
tools of decision-making theory and
practice. Such trees are particularly helpful
in situations of complex multistage decision
problems. For example, when you need to
plan and organize a sequence of decisions
and take into account how the choices made
at earlier stages and the outcomes of
possible external events determine the types
of decisions and events at later stages of that
sequence. 22
Advantage of Decision tree:-
a. Decision tree express the logic of IF-THEN-
ELSE in pictorial form, showing the conditions
and Actions.
b. Decision tree is useful when an action is
dependent on nested decision.
c. It describe conditions and actions and it forces
system analyst to identify the actual decision
that must be made.
d. Decision Trees are used to verify logic and
problems that involves a few complex decisions
and limited number of actions. 23
Disadvantages of Decision Trees:-
a. A decision tree for a very complex system
with many sequence of steps and
combinations of conditions will be
unmanageable.
b. A large number of branches with may paths
through them will confuse rather than help
in analysis. The analyst may not be able to
determine which business policies to adopt.
c. Lack of information provided in this format.
24
Q.1Draw a Decision tree for the policy followed by
a company in giving discounts to its customers as
described:
a. If the transaction is on credit, and the
customers credit record is good, then accept
his order but do not give any discount on
credit. If the customers credit record is not
good, then do not accept the order.
b. If the transaction is on cash, and the sale
amount is more than Rs.1000, then give a
discount of 20%.
25
c. If the transaction is on cash, and the
sale amount is more than Rs. 500 but
less than 1000, then give a discount of
10%.
d. No discount is to be given if the
transaction is cash and it is less than Rs.
500. but accept the order.
26
Conditions Actions
Bad credit
Reject order
record
On Credit
Good credit
Accept order
record
Nature of
Transaction 20%
Amount>1000 Discount
10%
Cash Amount>500 Discount
Amount<500 0% Discount
27
Structure English
Structured English uses narrative statements to
describe a procedure. It resembles a
programming language, so programmers find it
easy to understand. It uses three basic types of
statements:
(a) Sequential structures: They include a set of
instructions that are carried after another and do
not depend on any condition.
Ex: Accept Employee Code
Accept Employee Name
Accept Employee Age 28
2. Decision Structures: They include one or more
sets of instructions that are carried out depending
upon one or more conditions. They generally use
the phrase THEN ELSE to carry out different
actions.
Ex:
if(age>60)
print(“senior citizen”)
else if(“age<40”)
print(“matured”)
29
3. Iteration Structure: They include a set of
instructions that are repeated particular condition
occurs. They generally use the phase DO
WHILE…END DO to repeat a set of instructions
Ex:
int i=1
Do while(i<=10)
print(“i”)
i++
End Do 30
Sequential Decision Iteration
Structure Structure structure
Customer is bookstore? Y Y N N N N
Order size 6 books or more Y N N N N N
Customer librarian/Individual Y Y Y Y
Order size 50 books or more Y N N N
Order size 20-49 books? Y N N
Order size 6-19 books? Y N
Allow 25% discount X
Allow 15% discount X
Allow 10% discount X
Allow 5% discount X
No discount allowed X X
34
Advantages of Decision Tables:
1. They are easier to draw.
2. They provide a compact representation of the
decision making process. A small table can
replace several pages of flowcharts.
3. Decision tables are best suited for calculating
discounts and commission.
4. Decision table in concerned with the logic of
decision rules and is problem oriented.
5. The structure of decision table promotes a
logically complete and consistent problem
definition. 35
The different steps to make a Decision Table are:
38
39