process - university of nairobi staff profiles

Lecture 5
STRUCTURED SYSTEMS
ANALYSIS & DESIGN
Objectives

Explain SSADM

Describe tools of SSADM
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
2
1
SSADM

It is a data (logical) oriented approach to
system analysis and design that focuses
on nature and flow of data through the
system
APPROACH
 Uses models (graphics & pictorial) to
show relationships between data &
business processes throughout the
stages of analysis & design
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
3
Advantages

UNIVERSITY OF NAIROBI
Gives a pictorial representation that can
be understood by both users & system
developers
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
4
2
Types of modeling
 2 types
(a) Logical Data Modeling (LDM)
 Entity relationship Modeling (ERM)


Entity Behavior Modeling (EBM)
(b) Data Flow (process) Modeling
Data Flow Diagrams (DFD)
 Logic modeling

UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
5
(a) Logical (data) modeling

It is a technique of identifying & modeling
the data requirements of an IS.

LDM consists of logical data structures
(LDS) which represent entities and their
relationships through ERD/ERM diagrams

LDM is used in creation of databases and
is also called database modeling
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
6
3

ERM uses 3 major abstraction to describe
“things” to which data is related to: Entity,
attribute, instance & relationship

Entity = something for which data is recorded
about e.g., persons, events etc

Attributes:- characteristic/property of an entity
that has a unique value e.g., student (entity) is
described by attributes such as ID No., Name,
Age etc. They are stored as fields in a Table
UNIVERSITY OF NAIROBI

Nyongesa F. W.
SPH 108: ISAD
11/5/2013 10:24 AM
7
Table: = A grouping of records = basic data
structure
E.g., Entity = Student
Attributes/
Fields
Primary Key
Entity instance/
Record
Student
ID.
I39/3458/12
Name
Age
Hilda
20
Course
BTech
Value of
Attribute
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
8
4

Entity Instance (record) :- A single occurrence
of an entity e.g., one instance of entity “student”
is “Name” and value is “Hilda”

Primary) Key:- Unique identifier for the records
e.g., ID-No

Relationships = Associations between entities.

ERM uses these abstractions together with
relationship between entities to create
Databases
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
9
Creating a LDM

Collect and divide data about entities into
separate subjects (Fields)

Group related fields into (ONE) table

Create Primary Keys to link data in Tables

Determine nature of relationship between
entities

E.g., Information relating to books in library and
users (borrowers) can be grouped as follows:
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
10
5
Table: BOOK
ISBN
Author
Date-Pub Publisher Title
Table: BOOKINGS
Date-Out Due Date User-Id Title
Status
Relationships
Table: USER
User-ID
User_Name
Tel
Address Occupation
NB Fields in a Table should not be repeated in other tables

UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
11
Entity Relationship Modeling

ERM shows the associations between entities.

ERM Symbols
Entity
E.g., Student
Student
Courses
Relationship
between Entities
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
12
6
Degree of relationships
(a) One : One

For any entity A,  only one member of entity B
associated with it and vice versa. E.g.,
MD
Works for
Employs
Company
A kenyan
has 1 ID
Kenyan
ID Card
1 Card is issued
to 1 Kenyan
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
13
(a) One : Many
A Mother has
many children
Mother
Children
Many Children
belong to one
Mother
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
14
7

1:M
A dept has Many
Employees
Employee
Department
Many employees
Belong to 1 Dept
Cargo
aircraft
UNIVERSITY OF NAIROBI
Will serve
Distribution
centres
Is served by
Nyongesa F. W.
SPH 108: ISAD
11/5/2013 10:24 AM
15
(c) Many : Many
Product
Made of
Raw
material
Part of
Sales Person
is assigned to
Customer
Is called on by
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
16
8
Activity

A company has one CEO who is not employed
by another company. The company has several
divisions each of which employs several people,
No employee works for more than one division.
Each division produces several products. No
product is made by more than one division.
Each product may be made out of one or more
raw materials. Any raw materials may go into
one or more products.
Construct ERD from the narrative
UNIVERSITY OF NAIROBI
Nyongesa F. W.
SPH 108: ISAD
11/5/2013 10:24 AM
17
Soln

Entities: Company, CEO, Division, Employee,
pdts, raw materials
Company
Division
CEO
Employee
Product
Raw Materials
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
18
9

Once the relationships are developed, we
then create Databases

Database = An integrated collection of
logical data relating to an entity or
collection of related fields
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
19
(b) Process & Logic modeling

Process Modeling = technique of
identifying & modeling how data moves
around an IS by examining processes that
transform data, data stores and external
entities using DFDs.

Logic modeling shows the logical,
policies & procedures to be implemented
by a system’s process
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
20
10
(i) DFDs

UNIVERSITY OF NAIROBI

DFDs shows processes (activities) that
transform data from one form to another,
data sores (holding areas of data),
External entities (things that sent data into
or receive data from a system) and data
flows (routes by which data flows.
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
21
 2 types of DFDs
Logical DFD
 Physical DFD


Logical DFD
Shows actual data flows and processes that
transform data
 NOT concerned about HOW the system
works or will be constructed

UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
22
11
DFD symbols

External entities = Source or
destination of data e.g., Student,
Customer.

Processes = Actions that transform
data

Data stores = Temporary or
permanent stores of data that are
inputs to or outputs of processes

Data flows = transfer of data
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Student
2
Calculate
fees
D3
Student
file
Student Data
Nyongesa F. W.
SPH 108: ISAD
23
Developing DFDs

DFDs are developed using top-down approach
(a process called “Leveling”)

PROCEDURE
1. Define entities, data flows, processes & data
stores
2. Draw content diag (level 0)
3. Draw Parent diag (Level 1)
4. Processes on level 1 may in turn be
exploded to create more detailed child diags
(levels 2 …n)
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
24
12
Narrative
Start with Context diag that shows
• ONLY a single process (“the system”)
• External entities and data flows to and
from the system
• NO DATA STORES
Context Diag
(LEVEL 0)
Parent Diag
(LEVEL 1)
Create Level 1 DFDs that shows
• More Processes and data stores
Child Diags
(LEVEL 2)
Create CHILD DIAGS
(Levels 2,3 …, n) that
are “explosions” of
Level 1, 2…n-1 DFDs
until the diag shows only
“primitive” processes.
Explosions of Child Diags
(LEVEL N)
UNIVERSITY OF NAIROBI
-SPH_201_FWN,
NyongesaUoN
F. W.
SPH 108: ISAD
11/5/2013 10:24 AM
11/5/2013 10:24 AM
25
25
Example 1

Level 0 (Context Diag)
0
Student
Student
System

Level 1 DFD
Student
1
2
Process
Process
D1
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Student
Data store
Nyongesa F. W.
SPH 108: ISAD
26
13
Level 2 DFD

Shows child processes
Student
1
2
Process
Process
D2
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Student
2.1
2.2
Process
Process
D1
Data store
Data store
Nyongesa F. W.
SPH 108: ISAD
27
Rules on creating Child diagrams
1. A Child diag is created from a process of the previous
level diag
2. 1ST sub-Level (Child diags) are numbered to correspond
to the respective parent e.g., 2.1, 2.2 etc
3. Each Child diag should have the same number of input
and output data flow as the parent process i.e., data
flow from parent process to child diag must match
4. Child diags may include additional data stores not
shown in the parent process e.g., D2
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
28
14
Example 2
Level 0 (Context Diag)

Only 1 process (numbered 0) & NO Data
stores
0
Input A
Output B
Entity 1
Nyongesa F. W.
SPH 108: ISAD
11/5/2013 10:24 AM
UNIVERSITY OF NAIROBI
Entity 2
System
29
Level 1 DFD (Parent Diag)

Shows more (unexploded) processes & datastores
1
Entity 1
Input A
2
Data Flow B
Process
A
Output B
Process
B
Record A
D1
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Data Store 1
Entity 2
Record B
D2
Data Store 2
Nyongesa F. W.
SPH 108: ISAD
30
15
Level 2 DFD (Child Diags)
 Shows 1ST sub-levels of a process (i.e., explosion
of a process e.g., process 2)
Output flow
must match
1
Input A
Entity 1
2
Data Flow B
Process
A
Entity 2
Process
B
Output B
Record B
Record A
D1
2.1
2.2
2.3
Process
B1
Detailed
Process
B2
Detailed
Process
B3
Data Store 1
Additional data store
Data Store 3
D2
Data store 2
Nyongesa F. W.
SPH 108: ISAD
11/5/2013 10:24 AM
UNIVERSITY OF NAIROBI
D3
31
31
Example 3
Content diag of Library System

NB  3 outputs to user & 3 inputs from user
Books to
borrow
Register as member
user
confirmation
0
Lib
services
user
Borrowed
books
Clearance
user
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
32
16
Level 1 DFD of Lib system

NB  3 outputs to user & 3 inputs from user
Registration
request
1
User
registration
user
Confirmation
D1
User details
Registered users
User’s file
Borrow books
User
Books
2
Loans
desk
Copy of
book card
D2
Borrowed books
Book card
Due Books
User
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
11/5/2013 10:24 AM
Clearance
Books
3
D3
Book
Returns
Cleared cards
Desk
-SPH_201_FWN,
NyongesaUoN
F. W.
D4
SPH 108: ISAD
Shelving Books
Dustbin
33
33
Example 4
Airline Reservation system

Level 0 DFD
Preferences &
available flights
Travel
agent
Passenger
Travel request
0
Airline
reservation
system
Ticketing
information
Passenger
reservations
Airline
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
34
17
Rules in Constructing DFDs

No data flow is permitted between



Two Data Sources/External Entity
Two Data Stores
Data Stores and data source.
student
Student
D1
D2
Student
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
D1
Nyongesa F. W.
SPH 108: ISAD
35
Worked Example

ABC is a book publishing company in Westlands. It is
organized in sections e.g., accounting and sales
When the clerk receives book orders from bookstores, he
verifies the orders. He then checks the book information
as well as the customer credit from the customer file and
authorizes shipment through the warehouse. The
shipment is verified before shipping and it is accompanied
by an invoice. The clerk keeps a copy of the details of the
order in a file called "bookstore orders".
Accounts receivable are processed through the accounts
department from forms filled out by an accounting clerk.
Draw a logical model for the system
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
36
18
Soln




UNIVERSITY OF NAIROBI

Entities:
Data Stores:
Processes
Data Flows
Nyongesa F. W.
SPH 108: ISAD
11/5/2013 10:24 AM
37
Soln
D1
1. Orders
CUSTOMER
1.0
Verify
orders
BOOK INFORMATION
2. Check book
inform
4. Shipping orders
D3
3. Credit Check
D2
ACCOUNTS
BOOKSTORE
ORDERS
6. Copy of order
CUSTOMER
INFORMATION
FILE
8. forms
2.0
Verify
Shipment
7. Shipment + Notice
+ Invoice
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
11/5/2013 10:24 AM
WAREHOUSE
-SPH_201_FWN,
NyongesaUoN
F. W.
SPH 108: ISAD
5. Shipping
Information
CUSTOMER
38
38
19
Physical DFDs

Are created from Logical DFDs

It depicts the system i.e., it shows HOW
the system is physically implemented
(designed or works) including personnel,
hardware, software, databases, etc

Shows certain details not shown in logical
DFD such as type of activities that take
place in a process
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
39
Example of physical DFD
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
40
20
Logical
DFD of Doctors
billing system
Physician
Patient

a
Examination
Record
Verify Exam
record &
compute
fees
D1
Valid Fees
Completed
Insurance form
INSURANCE
Insurance Invoice CARRIERS
Patient
Prepare
Invoice
PATIENT
Invoice
Applicable
Patient
fees
Address
FEE SCHEDULE
D2
Insurance Schedule
& Address
PATIENT RECORD
D3
Verify
payment
from
patients
INSURANCE Co.
Correct
patient
Payment
UNIVERSITY OF NAIROBI
Carrier
Payment
Patient
Payment
11/5/2013 10:24 AM
11/5/2013 10:24 AM
-SPH_201_FWN,
NyongesaUoN
F. W.D4
SPH 108: ISAD
Verify
payment from
insurance
carriers
Correct
carrier
payment
ACCOUNTS RECEIVABLE
41
41
Advantages of DFDs

Provides better understanding of the business
to the analyst

Provides better communication with users
compared to narrative text

Identification of error and redundancies is easy
(in structured walkthroughs)

Physical DFDs Show sequence of process,
order and in detail how the system works from
top to minute details using the levelling
technique
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
42
21
Activity

Distinguish between logical and
physical DFD

List advantages of physical DFD over
logical DFD
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
43
Structured logic & Decisions

Logic modeling shows the logical, policies &
procedures to be implemented by a system’s process

Tools of Logic modeling:
UNIVERSITY OF NAIROBI

Decision tables :- Used to make a decision between
two or more choices depending on the value of the
condition

Decision Trees :- Useful for sketching logical
decisions where complex branching routines are
involved e.g, calculating discounts or sales
commissions etc.

Structured English:- suited to model logical
processes where sequencies of actions and decisions
are required
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
44
22
(a) Decision Tables

It’s a 2-D matrix that shows the decision rules
that apply when certain CONDITIONS occur
and ACTIONS to be taken
CONDITIONS (IF) Condition Entry Y/N)
ACTIONS (THEN) Action Entry (X)

UNIVERSITY OF NAIROBI
No of columns required in the condition entry =
2N where N =Number of conditions
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
45
Example

The delivery charge to be added to customer’s
invoices is determined as follows:
If the order value is at least 100,000/= and the
delivery distance is within 1 Km, the delivery
charge is 1,000/=. If the distance > 1 Km, the
delivery charge is 1,500/=. If the order value <
100,000/= and the delivery distance is within 1
Km, the delivery charge is 2,000/=, else
3,000/=. Draw a decision table from the above.
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
46
23
Soln



 2 conditions: Order value => 1000,000
Delivery dist within 1 Km
And 4 Actions (Charge 1,000, 1,500, 2,000 & 3,000)
 Entries = 22 =4
Order Value >= 100,000?
Y
Delivery Distance within 1 Km? Y
Charge 1,000
X
Y
N
Charge 1,500
X
Charge 2,000
Charge 3,000
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
N
Y
Y
N
X
X
Nyongesa F. W.
SPH 108: ISAD
47
Activity

ABC bookshop gives customers discount based
on the following policy:

Bookstores get 25% discount on orders of 6 or
more copies per book title and Nil for orders
less than 6 copies. For orders from libraries and
individuals, a 5% discount is allowed on orders
of 6-19 copies per book title; 10% on orders for
20-49% copies per book tittle; 15% for 50 or
more copies. Document this policy using
 Decision Tables
 Decision Trees
 Structured English
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
48
24
Soln
 3 conditions: Bookstore; Lib & Order
size


 5 Actions (25, 15, 5 & 0%)

 Entries = 23 = 6
Nyongesa F. W.
SPH 108: ISAD
11/5/2013 10:24 AM
UNIVERSITY OF NAIROBI
49
Soln

IF
888
RULES
Customer is bookstore
1
2
Y
Y
Library or Individual
Order size => 6 copies
Y
3
4
5
6
Y
Y
Y
Y
N
N
Order size 6 - 19 copies
Y
Order size 20 - 49 copies
Y
Order size => 50
THEN Allow 25% discount
Y
X
Allow 15% discount
X
Allow 10% discount
X
Allow 5% discount
X
Allow Nil discount
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
X
Nyongesa F. W.
SPH 108: ISAD
X
50
25
(b) Decision Trees

Useful for sketching logical decisions where
complex branching routines are involved in the
decision process e.g.,
Customer
Order size
Bookstore
Discount
policy
Libraries &
Individuals
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Discount
=>6
< 6
25
0
> 50
20 - 49
6 - 19
<6
15
10
5
0
Nyongesa F. W.
SPH 108: ISAD
51
(c) Structure English

suited to model logical processes where
sequencies of actions and decisions are
required

borrows heavily from control structures in
programming especially
…If..Then…Else..
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
52
26
Soln

IF (order is from bookstore & = > 6 copies) THEN
Discount = 25%
ELSE: Nil
END IF
ELSE
IF (Order from lib & Order > 50 copies) THEN
Discount = 15%
ELSE IF Order = 20-49 copies
Discount is 10%
ELSE IF Order = 16-19 copies
Discount is 5%
END IF
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
53
END
UNIVERSITY OF NAIROBI
11/5/2013 10:24 AM
Nyongesa F. W.
SPH 108: ISAD
54
27