Structured Analysis and Structured Design (SA/SD

)

J.Govindarajan, Asst.Prof., CSE

Structured Analysis: Functional modeling and Information Flow

J.Govindarajan, Asst.Prof., CSE

DATA FLOW DIAGRAM (Structured Systems Analysis )

J.Govindarajan, Asst.Prof., CSE

Data Flow Diagram
• Graphical representation that depicts information flow and the transforms that are applied as data move from input to output.

• The data flow diagram enables the software engineer to develop models of the information domain and functional domain at the same time.

• The basic form of a data flow diagram, also known as a data flow graph or a bubble chart.
J.Govindarajan, Asst.Prof., CSE

DFD : Information Flow Model

J.Govindarajan, Asst.Prof., CSE

.Prof. with each element making use of or modifying the information flowing into that element.Data Flow Diagram • Used for describing a very problem-oriented view of the workings of a system. • It provides a description based on modeling the flow of information around a network of operational elements. J. CSE .Govindarajan. Asst.

Govindarajan.. • Logical details of the procedures or sequences are generally delayed until software design. CSE .Prof. • DFD is different from flowchart. J. Asst.DFD : Information Flow Model • No explicit indication of the sequence of processing or conditional logic is supplied by the diagram.

Govindarajan..Prof. Asst.Elements of DFD • Entity • Process • Data flow • Data store J. CSE .

CSE . J.DFD: Abstraction • DFD may be used to represent a system or software at any level of abstraction. • DFDs may be partitioned into levels that represent increasing information flow and functional detail. • DFD provides a mechanism for functional modeling as well as information flow modeling.Prof..Govindarajan. Asst.

DFD: Information Flow Refinement J..Prof. CSE . Asst.Govindarajan.

.DFD: Supporting Products • Data dictionary • Process specification (PEPSec) – to specify the processing details implied by a bubble within a DFD J. Asst. CSE .Prof.Govindarajan.

Prof.Govindarajan. CSE . Asst..ATM: Level 1 diagram J.

Govindarajan.Prof. Asst.ATM: Level 1 diagram J.. CSE .

. Asst.Prof. CSE .Govindarajan.ATM: Level 2 diagram (Validate Customer Access) J.

e. J. • Represenation: Circle • Process Name: – Process name will describe what the process does – good name will generally consist of a verb-object phrase – Eg: VALIDATE INPUT or COMPUTE TAX RATE.Govindarajan.. Asst.Process • Purpose: – The process shows a part of the system that transforms inputs into outputs.i. CSE .Prof.it shows how one or more inputs are changed into outputs..

Password .. – Shows data in motion • Represenation: – arrow into or out of a process • Flow Name: – The name represents the meaning of the information that moves along the flow – good name: noun – Eg: Phone number. CSE .Govindarajan. J.Prof. User name. etc. Asst. or packets of information from one part of the system to another part.Flow • Purpose: – Used to describe the movement of chunks.

. CSE . Asst.Data flow • Same content may have a different meaning in different parts of the system J.Govindarajan.Prof.

Govindarajan.Prof. CSE . Input flow Output flow Dialog flow J. Asst..Data flow: Shows Direction • Flows show direction • an arrowhead at either end of the flow (or possibly at both ends) indicates whether data (or material) are moving into or out of a process (or doing both).

Asst.Dataflows : Diverge and Converge • Dataflows can diverge and converge in a DFD • Diverging flow: – Duplicate copies of a packet of data are being sent to different parts of the system. each of which is being sent to different parts of the system.Prof. aggregate packets of data. • Converging flow: – several elementary packets of data are joining together to form more complex.Govindarajan. J. or – Dataflow pipeline carries items with different values that are being separated.. or – Complex packet of data is being split into several more elementary data packets. CSE .

Prof. CSE .Govindarajan. Asst..Example : Dataflow Diverge J.

Govindarajan. Asst.Example : Dataflow Diverge J. CSE .Prof..

.Prof. CSE . Asst.DFD: Procedure details • DFD doesn’t answer following questions: – Questions about input prompts – Questions about output flows J.Govindarajan.

CSE ..Govindarajan. B. and C in order to produce exactly one output packet for output flows X. Asst. and Z? • Or are there two As for every three Bs? J.DFD: Process with multiple input and multiple output flows • DFD doesn’t answer following questions : – in what sequence do the packets of data arrive? – in what sequence are the output packets generated? – Is there a one-to-one ratio between the input packets and the output packets? • Does process Q require exactly one packet from input flows A.Prof. Y.

Prof. J.Govindarajan. CSE .Store • Purpose: – used to model a collection of data packets at rest. Asst.. – stores represent data at rest • Representation: – Two parallel lines Alternative Represenations: • Store Name: – Chosen to identify the store is the plural of the name of the packets that are carried by flows into and out of the store.

.Govindarajan.Prof. CSE . Asst.Data store vs database • Datastore: – abstract graphical notation possible implementations – Possible forms of datastore: • File • Database • Data stored in optical disk or other electronic forms for variety of J.

CSE ..Govindarajan.Prof. Asst. • Implementation requirement J.Data store • User requirement: – The store exists as a necessary time-delayed storage area between two processes that occur at different times.

Asst.Govindarajan. J. • Either or both of the processes are expected to run on a computer hardware configuration that is somewhat unreliable. CSE .Data store: Implementation Requirement • Both processes are expected to run on the same computer..Prof. • The systems analyst or the systems designer thought that the user might eventually want to access the information for some other purpose. but there isn’t enough memory (or some other hardware resource) to fit both processes at the same time.

Prof. CSE .. Asst.Data store: User Requirement J.Govindarajan.

CSE ..Data store: Implementation Requirement J.Govindarajan.Prof. Asst.

stores.  Avoid overly complex DFDs. CSE .Prof. Asst.  Redraw the DFD as many times as necessary for esthetics. J.  Make sure the DFD is internally consistent and consistent with any associated DFDs.  Number the processes. and terminators.Govindarajan.Guidelines : Constructing DFD  Choose meaningful names for processes. flows..

Prof.. An inappropriate process name • Examples of good process names: • Calculate missile trajectory. • Produce inventory report • Validate phone number • Assign students to class Appropriate process name • Examples of poor process names: • Take Care of Customers • Process Data • General Edit J. rather than the person’s name or identity.Guideline: Choose meaningful names • Process: • Identify the role that the person is carrying out. Asst. CSE .Govindarajan.

Guideline: Number the Processes • The DFD model is a network of communicating.. an accurate representation of the way most systems actually operate. • Some sequence may be implied by the presence or absence of data – e..Prof.Govindarajan. it may turn out that bubble 2 cannot carry out its function until it receives data from bubble 1 • But the numbering scheme has nothing to do with sequence. • Use of numbering: Convenient way of referring to the process J. CSE .g. in fact. Asst. asynchronous processes. which is.

Govindarajan. and generally incorrect. Asst. CSE . • Avoid spontaneous generation process – Process that have outputs but no inputs are suspicious. – Example for exception: Random number generator J.Prof..Guideline: Ensure that DFD Is Logically Consistent • Avoid infinite sinks (or black holes) – Process that have inputs but no outputs.

Asst.Guideline: Ensure that DFD Is Logically Consistent • Beware of unlabeled flows and unlabeled processes • Beware of read-only or write-only stores – store should have both inputs and outputs J.Govindarajan. CSE ..Prof.

Prof.Govindarajan.. CSE . Asst.LEVELED DFDs J.

Prof..balanced DFD fragment J. Asst. CSE .Govindarajan.

Prof.Balanced DFD fragment: out of balance J.. CSE .Govindarajan. Asst.

Prof.Govindarajan. Showing stores at lower levels J. Asst. CSE . Show a store at the highest level where it first serves as an interface between two or more bubbles  Then show it again in EVERY lower-level diagram that further describes (or partitions) those interface bubbles..

Govindarajan.. Constructing child diagrams (Level 1 Diagrams) will be drawn for each process illustrated by Level 0 diagrams. Making a list of business activities to determine the DFD elements (external entities. Asst. and associated external entities. data flows. Constructing Level 1 Diagrams: which reveals general processes and data stores 1. 1.Prof. CSE .Process of developing DFD 1. processes. 1. and data stores). J. Constructing context diagram or Level 0 diagram is constructed that shows only a single process (representing the entire system).

Prof. Asst.Govindarajan. CSE .Examples J..

CSE . Asst.Prof.. sends the order to the kitchen.Food ordering system The restaurant uses an information system that takes customer orders. monitors and the goods sold and for generates reports management. inventory. J.Govindarajan.

.Prof. Review and modify ( Do until satisfied) J.Govindarajan. Allocate significant nouns and verbs by extracting those who play one of data flaw diagrams four roles 3. Assign significant components to notations Connect notations 6. Asst. CSE . Explore domain components and add more significant 5. Eliminate: Redundant . Identify nouns and verbs generally 2. Irrelevant components plus internal entities 4.Look for nouns and verbs 1.

Food ordering system The restaurant uses an information system that takes customer orders. sends the order to the kitchen. Asst.. stores the goods sold. J.Govindarajan. CSE . and generates management reports for manger and receipts for customer.Prof.

Functions • takes customer orders. . J. • sends the order to the kitchen • Stores the goods sold • generates management reports for manger and receipts for customer. CSE .Prof.Govindarajan. Asst..

• sends the order to the kitchen • Stores the goods sold • generates management reports for manger • generates receipts for customer.Functions • takes customer orders..Prof. Asst. CSE . J..Govindarajan.

CSE . Asst.Prof.Data and Entity Data • takes customer orders. • sends the order to the kitchen • Stores the goods sold • generates management reports for manger • generates receipts for customer.. • customer Order • Food order • Goods • Manager reports • Customer receipt Entity •Customer •Kitchen •Manager J.Govindarajan.

CSE .Prof..Govindarajan.Food Processing System: Context flow diagram Customer Order Customer Food Order Customer receipt Kitchen Food Ordering System Management report Manager J. Asst.

J. CSE .Major Functions • takes customer orders • sends the order to the kitchen • Stores the goods sold • generates management reports for manger • generates receipts for customer.Prof.Govindarajan.. Asst.

CSE management reports for . • generates manager J.Major Functions • takes customer orders • sends the order to the kitchen • Stores the goods sold • generates receipts for customer. Asst..Prof.Govindarajan.

Receive and Transform customer order 2.Prof.Govindarajan.Food Processing System: Level 1 diagram Customer Order Customer Goods Sold Goods sold Daily Goods Sold Customer receipt 1. Asst. Generate Manager Reports Food Order Manager Report Kitchen J. CSE Manager ..

CSE Goods sold . Asst. Receive customer order Customer receipt 1.. Generate Customer report Customer Order Customer Order Customer Order 1. Stores goods sold Goods Sold Kitchen J. Transform customer order Food Order 1.4.2.Govindarajan.1.Prof. 3.Level 2 (Decomposing Process 1) Customer Customer Order 1.

Asst.1.Govindarajan.Prof.Level 2 (Decomposing Process 2) Goods sold Daily Goods Sold 2.3. Generate Report Daily Goods Sold Manager Report Manager J. Access Goods Sold 2. Aggregate Goods Sold Aggregate Daily Goods Sold 2.2. CSE ..