103
Tools for Structured Design Organized By: Vinay Arora Assistant Professor CSED, Thapar University www.slideshare.net/aroravinay

A&D - DT, DD, DFD

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: A&D - DT, DD, DFD

Tools for Structured Design

Organized By: Vinay Arora

Assistant Professor

CSED, Thapar University

www.slideshare.net/aroravinay

Page 2: A&D - DT, DD, DFD

V.A.

CSED

Disclaimer

This is NOT A COPYRIGHT MATERIAL

Content has been taken mainly from the following books:

System Analysis and Design Methods By Jeffrey L Whitten & Lonnie D Bentley ,

Analysis & Design of Information Systems By James A. Senn,

System Analysis & Design By Elias M. Awad,

Modern System Analysis & Design By Jeffrey A. Hoffer, Joey F.George & Joseph

S. Valacich

Page 3: A&D - DT, DD, DFD

V.A.

CSED

Tools for Structured Analysis

For the Business System under Investigation DECISION & PROCEDURES are Important to System Analyst.

Various TOOLS are present for Studying Operational Procedures and Decision Making Steps.

TOOL – A Device, Object or Operation used to accomplish a Specific Task.

Three TOOLS for Documenting Procedures:

Decision Tree, Decision Table and Structured English

Page 4: A&D - DT, DD, DFD

V.A.

CSED

Structured English

� STRUCTURED ENGLISH is the use of the English Language with the

SYNTAX of Structured Programming.

� STRUCTURED ENGLISH aims at getting the benefits of both the

Programming Logic and Natural Language.

� Program Logic helps to attain precision while natural language helps in

getting the convenience of spoken Languages.

� Method to Overcome Problem of AMBIGUOUS Language.

Page 5: A&D - DT, DD, DFD

V.A.

CSED

Guidelines when writing Structured

English

� Statements should be Clear and Unambiguous

� Use One Line per Logical Element

� All LOGIC should be expressed in Operational, Conditional and

Repetition Blocks

� Logical Blocks should be indented to show Relationship

� Keywords should be Capitalized

Page 6: A&D - DT, DD, DFD

V.A.

CSED

Structured English (contd.)

Page 7: A&D - DT, DD, DFD

V.A.

CSED

Common Keywords

� START, BEGIN, END, STOP, DO, WHILE, DO WHILE, FOR,

� UNTIL, DO UNTIL, REPEAT, END WHILE, END UNTIL, END

� REPEAT, IF, IF THEN, ELSE, IF ELSE, END IF, THEN, ELSE

� THEN, ELSE IF, CASE, EQUAL, TRUE, FALSE, AND, OR, XOR

Page 8: A&D - DT, DD, DFD

V.A.

CSED

Developing Structured Statements

Structured English uses THREE Basic Types of Statements to describe a

PROCESS:

� SEQUENCE STRUCTURES

� DECISION STRUCTURE

� ITERATION STRUCTURES

Page 9: A&D - DT, DD, DFD

V.A.

CSED

Sequence Structures

� A Single Step or Action Included in a Process.

� None of the Steps contains a Decision or any Conditions that determine whether the steps are taken.

� Operation Statements written as ENGLISH PHRASES executed from the top down.

Example:

1). Pick Out a Desirable Book

2). Take the Book to the Checkout Counter

3). Pay for the Book

4). Obtain a Receipt

5). Leave the Store

Page 10: A&D - DT, DD, DFD

V.A.

CSED

Decision Structure

� Another way of Showing Decision Analysis.

� Decision Structures occur When TWO or MORE Actions can be taken,

depending on the value for a Specific Condition.

� After Decision Making Stated Actions or Sets of Actions for that

Condition will be taken.

� Once Condition is made, ACTIONS are Unconditional.

� Keywords Like IF/THEN/OTHERWISE are used.

Page 11: A&D - DT, DD, DFD

V.A.

CSED

Example

IF a desirable book is found, THEN

Take the book to the checkout counter.

Pay for the book.

Be sure to obtain a receipt.

Leave the store.

OTHERWISE

Do not take the books to the checkout counter.

Leave the Store.

END IF

Page 12: A&D - DT, DD, DFD

V.A.

CSED

Iteration Structure

� Iteration Instructions permit Analyst to Describe the cases where:

Certain Activities are repeated WHILE a certain Condition Exists

OR

UNTIL a Condition Occurs

Page 13: A&D - DT, DD, DFD

V.A.

CSED

Example

DO WHILE Still examining more books.

Read the title of the Book.

IF the title sounds interesting

THEN pick up the book and thumb through it.

Look at the Price.

IF you decide you want the book

Put it in the DESIRABLE BOOK stack.

ELSE Put it back on the shelf.

END IF

ELSE Continue

END DO

Page 14: A&D - DT, DD, DFD

V.A.

CSED

IF Desirable books are found THEN

Take the books to the checkout counter.

Pay for the books.

Be sure to obtain a receipt.

Leave the store.

ELSE

Do not take books to the checkout counter

Leave the store

END IF

Page 15: A&D - DT, DD, DFD

V.A.

CSED

Tree Structure

Page 16: A&D - DT, DD, DFD

V.A.

CSED

Decision Tree

� Conditions – Possible States of an ENTITY.

� Action – What to do when certain condition/s occur…

� Actions are the Alternatives.

� Tools used in Understanding & Matching combinations are -

- Decision Trees

- Decision Tables

- Structured English

Page 17: A&D - DT, DD, DFD

V.A.

CSED

Decision Tree

� Decision Tree – Diagram that presents CONDITIONS and ACTIONS

sequentially.

� Shows which CONDITIONS to consider First which Second and so on.

� Method of showing the relationship of condition & its permissible

actions.

� Diagram resembles branch of a TREE.

Page 18: A&D - DT, DD, DFD

V.A.

CSED

Decision Tree – Basic Layout

Page 19: A&D - DT, DD, DFD

V.A.

CSED

Decision Tree Sample

Page 20: A&D - DT, DD, DFD

V.A.

CSED

Decision Tree Example

Page 21: A&D - DT, DD, DFD

V.A.

CSED

Decision Tree (cont.)

� Formal Identification of Actual Decision.

� Force Analyst to Consider the Sequence of Decisions.

� Drawback of Decision Tree – A Large number of branches with many

paths through them will cloud rather than aid analysis.

Page 22: A&D - DT, DD, DFD

V.A.

CSED

Decision Tree for Invoice Processing

Page 23: A&D - DT, DD, DFD

V.A.

CSED

Example Decision Tree – Students Data

Page 24: A&D - DT, DD, DFD

V.A.

CSED

Example Decision Tree – Students Data – Take

student as root node

Page 25: A&D - DT, DD, DFD

V.A.

CSED

Example Decision Tree – Students Data – Take

income as 2nd node

Page 26: A&D - DT, DD, DFD

V.A.

CSED

Example Decision Tree – Students Data (contd.)

Page 27: A&D - DT, DD, DFD

V.A.

CSED

Example Decision Tree – Students Data (contd.)

Page 28: A&D - DT, DD, DFD

V.A.

CSED

Example Decision Tree – Students Data (contd.)

Page 29: A&D - DT, DD, DFD

V.A.

CSED

Example Decision Tree – Students Data (contd.)

Page 30: A&D - DT, DD, DFD

V.A.

CSED

Decision Table

� Decision Table – Matrix of Rows & Columns, rather than a TREE.

� Decision Rules are present in Decision Table.

� Decision Tables are a Precise yet Compact WAY TO MODEL complicated

logic.

� Decision Tables, like If-Then-Else and Switch-Case Statements,

ASSOCIATE CONDITIONS WITH ACTIONS to perform.

� Decision Rule – Procedure to follow when certain Conditions Exits.

Page 31: A&D - DT, DD, DFD

V.A.

CSED

Decision Table

Page 32: A&D - DT, DD, DFD

V.A.

CSED

Decision Table – Example Health Services

Page 33: A&D - DT, DD, DFD

V.A.

CSED

Decision Tree - Example

Longer than 10 Days Within 10 Days

Over $10000

$5000 to $10000

Take 2% Discount from

Invoice TotalTake 3% Discount from

Invoice Total

Pay Full Invoice Amount

Below $5000

Pay Full Invoice Amount

Page 34: A&D - DT, DD, DFD

V.A.

CSED

Relation of Condition & Action

Page 35: A&D - DT, DD, DFD

V.A.

CSED

Decision Table – Example Payment

Discount

� There are various Formats of Decision Tables. Format doesn’t Change

the Usefulness of Decision Table.

Page 36: A&D - DT, DD, DFD

V.A.

CSED

Building Decision Table - Steps

1- Determine most relevant factors to consider in making a DECISION.

2- Determine the most feasible steps or activities under varying conditions.

3- Study the Combinations of Conditions that are Possible.

4- Fill in the Table with DECISION Rules.

5- Mark Action entries with ‘X’ to signal action(s).

6- Examine Table for Redundant Rules.

Page 37: A&D - DT, DD, DFD

V.A.

CSED

Decision Table –Payment Discount Example

Using Yes/No Format

Page 38: A&D - DT, DD, DFD

V.A.

CSED

Checking Decision Table

� Eliminating Redundancy

� Removing Contradictions

Page 39: A&D - DT, DD, DFD

V.A.

CSED

Common Discrepancies

Page 40: A&D - DT, DD, DFD

V.A.

CSED

Decision Table – Discrepancies Removed

Page 41: A&D - DT, DD, DFD

V.A.

CSED

Types of Table Entries

� Limited Entry Form

� Extended Entry Form

� Mixed Entry Form

� ELSE Form

Page 42: A&D - DT, DD, DFD

V.A.

CSED

Decision Table – Limited Entry

Page 43: A&D - DT, DD, DFD

V.A.

CSED

Decision Table – Extended Entry

Page 44: A&D - DT, DD, DFD

V.A.

CSED

Decision Table – Mixed Entry

Page 45: A&D - DT, DD, DFD

V.A.

CSED

Decision Table – Else Form

Page 46: A&D - DT, DD, DFD

V.A.

CSED

Data Dictionary

� DATA DICTIONARY – Can be defined as a CATALOG or a

REPOSITORY of the Elements in a SYSTEM.

� To Manage details in a Large System.

� To Document the features of a System.

� To Communicate a Common Meaning for all System Elements.

� Record in DD – Data Element, Data Structure.

Page 47: A&D - DT, DD, DFD

V.A.

CSED

Data Dictionary

Page 48: A&D - DT, DD, DFD

V.A.

CSED

Data Dictionary

Page 49: A&D - DT, DD, DFD

V.A.

CSED

Describing Data Elements

� Data Names

� Data Description

� Aliases

� Length

� Data Value

Page 50: A&D - DT, DD, DFD

V.A.

CSED

Relation b/w components

Page 51: A&D - DT, DD, DFD

V.A.

CSED

Describing Data Structures

� Sequence Relationship

� Selection Relationship

� Iteration Relationship

� Optional Relationship

Page 52: A&D - DT, DD, DFD

V.A.

CSED

Sequence Relationship

Page 53: A&D - DT, DD, DFD

V.A.

CSED

Selection Relationship

Page 54: A&D - DT, DD, DFD

V.A.

CSED

Iteration Relationship

Page 55: A&D - DT, DD, DFD

V.A.

CSED

Optional Relationship

Page 56: A&D - DT, DD, DFD

V.A.

CSED

Notation for Structural Rel. in Data

Page 57: A&D - DT, DD, DFD

V.A.

CSED

Data Structure for Student Data

Page 58: A&D - DT, DD, DFD

V.A.

CSED

Data Description & Notation

Page 59: A&D - DT, DD, DFD

V.A.

CSED

Data Flow Name

Page 60: A&D - DT, DD, DFD

V.A.

CSED

Data Structure

Page 61: A&D - DT, DD, DFD

V.A.

CSED

Data Element

Page 62: A&D - DT, DD, DFD

V.A.

CSED

Process

Page 63: A&D - DT, DD, DFD

V.A.

CSED

Structured Analysis Components

Page 64: A&D - DT, DD, DFD

V.A.

CSED

DFD – A Tool for data flow analysis

� DFD - A Structured, Diagrammatic technique for showing the functions performed by a System & the data flowing Into, out of & within it.

Following Data-Oriented Questions about a Target System:

� What processing is done?

� What data is Needed?

� The Context Diagram (Level 0 DFD) is the Highest Level in a Data Flow Diagram and contains only One Process, representing the ENTIRE SYSTEM.

Page 65: A&D - DT, DD, DFD

V.A.

CSED

DFD Style - Yourdon

Page 66: A&D - DT, DD, DFD

V.A.

CSED

DFD Style - Yourdon

Page 67: A&D - DT, DD, DFD

V.A.

CSED

DFD Style - Gane and Sarson

Page 68: A&D - DT, DD, DFD

V.A.

CSED

DFD Style - Gane and Sarson

Page 69: A&D - DT, DD, DFD

V.A.

CSED

Expanding Modules – while locating Thapar

University using Google maps – Step 1

Page 70: A&D - DT, DD, DFD

V.A.

CSED

Expanding Modules – while locating Thapar

University using Google maps – Step 2

Page 71: A&D - DT, DD, DFD

V.A.

CSED

Expanding Modules – while locating Thapar

University using Google maps – Step 3

Page 72: A&D - DT, DD, DFD

V.A.

CSED

Expanding Modules – while locating Thapar

University using Google maps – Step 4

Page 73: A&D - DT, DD, DFD

V.A.

CSED

Expanding Modules – while locating Thapar

University using Google maps – Step 5

Page 74: A&D - DT, DD, DFD

V.A.

CSED

DFD – Expanding Modules

Page 75: A&D - DT, DD, DFD

V.A.

CSED

DFD Principles

� A System can be decomposed into Subsystems and Subsystems can be

decomposed into Lower Level Subsystems and so on.

� Each Subsystem represents a Process or Activity in which data is

processed.

� At the Lowest Level, Processes can no longer be decomposed.

� Just as a System must have Input and Output, so a Process must have

Input and Output.

� Data Enters the System from the Environment, Data Flows between

Processes within the System and Data is produced as Output from the

System.

Page 76: A&D - DT, DD, DFD

V.A.

CSED

Rules for constructing DFD

Page 77: A&D - DT, DD, DFD

V.A.

CSED

DFD Example – A Restaurant

Page 78: A&D - DT, DD, DFD

V.A.

CSED

DFD Example - A Restaurant

Page 79: A&D - DT, DD, DFD

V.A.

CSED

DFD Level 0 (A Restaurant)

Page 80: A&D - DT, DD, DFD

V.A.

CSED

DFD Level 1 (A Restaurant)

Page 81: A&D - DT, DD, DFD

V.A.

CSED

Division of Main Program in Modules

Page 82: A&D - DT, DD, DFD

V.A.

CSED

Example – DFD Construction

Page 83: A&D - DT, DD, DFD

V.A.

CSED

Example – DFD Construction (contd.)

Page 84: A&D - DT, DD, DFD

V.A.

CSED

Presentation Graph

Page 85: A&D - DT, DD, DFD

V.A.

CSED

Physical DFD

Page 86: A&D - DT, DD, DFD

V.A.

CSED

Division in Modules

Page 87: A&D - DT, DD, DFD

V.A.

CSED

Context Diagram (DFD Level -0)

Page 88: A&D - DT, DD, DFD

V.A.

CSED

DFD Level -1

Page 89: A&D - DT, DD, DFD

V.A.

CSED

Expanding – Invoice Approval (DFD Level -2)

Page 90: A&D - DT, DD, DFD

V.A.

CSED

Expanding - Revise Balance Due (DFD Level -2)

Page 91: A&D - DT, DD, DFD

V.A.

CSED

Expanding - Write Vendor Checks (DFD Level -2)

Page 92: A&D - DT, DD, DFD

V.A.

CSED

Example – Context Diagram

Page 93: A&D - DT, DD, DFD

V.A.

CSED

DFD Level 0

Page 94: A&D - DT, DD, DFD

V.A.

CSED

Sequence of Logical & Physical View

Page 95: A&D - DT, DD, DFD

V.A.

CSED

Physical & Logical DFD

� WHAT the System does - Current Physical DFD

� HOW it does it - Current Logical DFD

� WHAT it should do - Required Logical DFD

� HOW it should do it - Required Physical DFD

Page 96: A&D - DT, DD, DFD

V.A.

CSED

1st Level DFD – Account Payable Processing

Page 97: A&D - DT, DD, DFD

V.A.

CSED

2nd Level DFD – Invoice Approval

Process

Page 98: A&D - DT, DD, DFD

V.A.

CSED

2nd Level DFD - Maintaining Vendor

Balance (A/C Posting)

Page 99: A&D - DT, DD, DFD

V.A.

CSED

2nd Level DFD – Vendor Payment

Processing (Cheque Writing)

Page 100: A&D - DT, DD, DFD

V.A.

CSED

1st & 2nd Level DFD

Page 101: A&D - DT, DD, DFD

V.A.

CSED

3rd LEVEL

DFD

Page 102: A&D - DT, DD, DFD

V.A.

CSED

Reference List

1. System Analysis and Design Methods By Jeffrey L Whitten & Lonnie D Bentley

2. Analysis & Design of Information Systems By James A. Senn

3. System Analysis & Design By Elias M. Awad

4. Modern System Analysis & Design By Jeffrey A. Hoffer, Joey F.George & Joseph S. Valacich

5. http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_9

6. http://www.ehow.com/about_5095247_definition-data-flow-diagrams.html

etc…….

Page 103: A&D - DT, DD, DFD

V.A.

CSED

Thnx…