Structured Analysis and Structured Design
Structured Analysis and Structured Design
Design
• Introduction
• SASD Tools and Exercises
• Pros and Cons
• Comparisons with Other Techniques
• Conclusion
• References
Definition of Structured analysis
Interesting Quote:
“There is no reason for any individual to have a
computer in his home.” Kenneth H. Olson, Digital
Equipment Corp. 1977.
Philosophy of structured analysis and
design
• Analysts attempt to divide large, complex problems
into smaller, more easily handled ones. “Divide and
Conquer”
• Top-Down approach (Classical SA), or Middle-Out
(Modern SA)
• Functional view of the problem. “Form follows
function”
• Analysts use graphics to illustrate their ideas
whenever possible.
• Analysts must keep a written record.
Philosophy of structured analysis and
design
• “[The purpose of SASD] is to develop a useful,
high quality information system that will meet
the needs of the end user.”
[Yourdon, 1989]
Goals of SASD
Essential Model
Environmental Behavioural
Model Model
Implementation Model
Essential Model
Does not define how the system will accomplish its purpose.
Essential Model
Environmental Behavioural
Model Model
Implementation Model
Environmental Model
Implementation Model
Behavioural Model
Implementation Model
Implementation Model
requirements. Environmental
Model
Behavioural
Model
• Tool: Structure Charts
Implementation Model
Analysis & Design Process
Environmental Model
Statement of
Behavioural Model
Purpose
Implementation
y
Activit
Co
n
t
Event List Data Dictionary Model
e ERD
x DFD
Process Specification
t
State Transition
D Diagram
i S
a t
g r
Time
r u
a c
m t
Statement of Purpose
flows
Context Diagram - Example
Customer Service
Application
Customer Credit
Bills
Payment Credit Card Overdue Collection
• Similar to “use-cases”
Event List - Types
• Analysis Phase:
• Data Flow Diagram: In a DFD model describe how the
data flows through the system.
• Data Dictionary: The content that is missing from DFD is
described in the data dictionary. Data Dictionary defines
the Data store and there relevant meaning.
• State Transition Diagrams is similar to Dynamic model .It
specifies how much time function will take to execute and
data access triggered by events.
• ER Diagram: It specifies the relationship between data
store
SA/SD
New
Transaction
Customer
Customer* 1.0 2.0
Store
Card Transaction
Process
Number Open to Capture Authorization
Application
Cards Buy
Account
Details
Transaction
Account
3.0
Transaction Total
Transaction
Bill
Transactions
Customer
Cheque
Credit Terms
Status
Amount
Overdue
5.0 Customer
Amount
Service
4.0
Determine Overdue Account
Overdue
Process
Accounts
Payment Cheque
Customer*
Collection
Company
Data Flow Diagram - Leveling
cheque
Process
amount,
Payment
account amount,
Account
account
Data Flow Diagram –
Validation
Black Hole
Spontaneous
Data Flow Diagram –
Validation
Context diagram - Exercise
Cash
invoice requirements-report
Pay-
Vendor invoice management
Payment
payment authorization
Cash-requirement
report
accounting
[Kendall 1996]
Data Flow Diagram - Exercise
2.
1. Valid invoice details Check
invoice
Invoice Cash requirements report
Check valid
Payment
Invoice authorization
Purchase order
Packing slip item details
details
vendors
Purchase
orders
Pending
Packing slip
invoices
item details
Payment authorization
3.
payment authorization
(Manual) Produce
payment
Payment
3/15/2012 s.k.chakravarti 34
Data Dictionary - Purpose
• Example:
– Alien: “What’s a name?”
– Person: “Well, you know, it’s just a name. It’s what we call each other.”
– Alien: “Does that mean you can call them something different when you
are angry or happy?”
– Person: “No, of course not. A name is the same all the time.”
– Alien: “Now I understand. My name is 3.141592653”.
– Person: “Oh your name is PI…But that’s a number, not a name. But what
about your first and last name. Or is your first name 3, and your last name
141592653?”
Data Dictionary – Notation
• = is composed of
• + and
• () element is optional
• {} iteration
• [] select one of a list of elements
• | seperates choices of elements
• **comments
• @ identifier for a store (unique id)
Data Dictionary - Examples
Build data dictionary items for the vendor name and vendor
address
3/15/2012 s.k.chakravarti 40
Entity Relationship Diagram
(ERD) - Purpose
• A graphical representation of the data layout
of a system at a high level of abstraction.
• Defines data elements and their inter-
relationships in the system.
Entity Relationship Diagram -
Notation
Data Element
Relationship
Associated Object
Cardinality – Exactly one
Cardinality – Zero or
one
Cardinality –
Mandatory Many
Entity Relationship Diagram -
Example
Payments
receive Bills
are made
generate
Accounts of
Transactions
contains
pay for include
Cards
Transaction
_
products
Entity Relationship Diagram - Exercise
Create an ERD for the Warm Boot Manufacturing System
Entity-Relationship diagram -
Solution
PACKING-SLIP-
INVENTORY-ITEMS receives ITEM-DETAILS
orders itemizes
PURCHASE-ORDER
ITEM-DETAILS
includes PACKING-SLIP-
DETAILS
itemizes
Purchases VENDORS
PURCHASE-ORDERS from
3/15/2012 s.k.chakravarti 45
Structure Charts - Purpose
Control
Modules
Library modules
Module call
Data
Flag
Structure Charts - Cohesion
Functional
Elements are combined to complete one specific function.
Sequential
Elements are combined because data flows from one step to
another.
• Communicational
Elements are combined because they all act on one data
store.
Procedural
Elements are combined because control flows from one step
to
another.
3/15/2012 s.k.chakravarti 50
Structure Charts - Cohesion
Temporal
Statements are together because they occur at the same time.
Logical
Elements are together because of their type of function such as all edits.
Coincidental
Elements are grouped together randomly
Structure Charts - Coupling
Indirect relationship
Modules are independent and there is no way to communicate.
Data
Only necessary data is passed between two modules.
Stamp
A data structure is passed to a module but the module only needs a
portion of the data in the data structure.
Control
Flags are passed between modules.
Structure Charts - Coupling
External
Two or more modules reference the same piece of external data . This is
unavoidable in traditional batch processing.
Common
Modules access data through global variables.
Content
One module changes the data of another module.
Structure Charts - Example
Payment
Raw Payment Payment
Payment Error
Raw
Payment
Update Insert
Payment
Account Paymen
Read Edit
t Event
Record Record
Process Specifications - Purpose
Apply Payment
For all payments
If payment is to be applied today or earlier
And has not yet been applied
Read account
Read amount
Add amount to account’s open to buy
Add amount to account’s balance
Update payment as applied
State Transition Diagram - Purpose
• Shows the time ordering between processes
State Transition Diagram – Notation
Objects
Transition
s
State Transition Diagram – Example
Customer
Customer Active pays bills
makes purchase Account.
Account Balance Customer
application makes purchase
Customer
Create request to
New Account. close account & Customer
No pays balance does
Balance not pay
bills
Closed
Account. Bad Debt
No Balance
Account.
Balance
Following steps
• Flexible
• Provides a means of requirements validation
• Relatively simple and easy to read
Pros of SASD
Context Diagram:
• Provides a black box overview of the system and the environment
Event List:
• Provides guidance for functionality
• Provides a list of system inputs and outputs
• Means of requirements summarization
• Can be used to define test cases
DFD:
• Ability to represent data flows
• Functional decomposition- divide and conquer
Pros of SASD
Data Dictionary:
• Simplifies data requirements
• Used at high or low level analysis
ERD:
• Commonly used; well understood
• Graphical tool; easy to read by analysts
• Data objects and relationships are portrayed independently from the
processes
• Can be used to design database architecture
• Effective tool to communicate with DBAs
Pros of SASD
Process Specifications:
• Expresses the process specifications in a form that can be verified.
Structure Charts:
• Modularity improves system maintainability
• Provides a means for transition from analysis to design
• Provides a synchronous hierarchy of modules
Cons of SASD
Context Diagram:
• Does not provide a specific means to determine the scope of the system.
Event List:
• Does not define all functionality (ex. Edits)
• Does not define specific mechanism for interaction.
DFD:
• Weak display of input/output detail
• Users find it confusing initially
• Do not represent time
• No implied sequencing
• Assign data stores early in the analysis with little deliberation
Cons of SASD
Data Dictionary:
• No functional details
• Formal language is confusing to users
ERD:
• May be confusing for users; formal notation
• Complex in large systems
Structure Charts:
• Does not work well for asynchronous processes such as networks
• Could be too large to be effectively understood with large programs.
Cons of SASD
Process Specifications:
• They may be too technical for the users
• Difficult to stay away from the current “How”
Similarities
• Both SASD and OOAD had started off from programming techniques
• Both techniques use graphical design and graphical tools to analyze and model the
requirements.
• Both techniques provide a systematic step-by-step process for developers
• Both techniques focus on documentation of the requirements
SASD vs. OOAD
Differences
• SASD is Process-Oriented
• OOAD is Data-Oriented
• Another difference is that OOAD encapsulates as much of the systems' data and
processes into objects
• while SASD separates between them