43
An overview of What & How 04-04-2016 Ankur Biswas 1

Understanding Data Flow Diagram

Embed Size (px)

Citation preview

Page 1: Understanding Data Flow Diagram

An overview of What & How

04-04-2016Ankur Biswas

1

Page 2: Understanding Data Flow Diagram

A process model is a formal way of representing how a business operates

Data flow diagramming shows business processes and the data that flows between them

Logical process models describe processes without suggesting how they are conducted

Physical models include information about how the processes are implemented

04-04-2016Ankur Biswas 2

Page 3: Understanding Data Flow Diagram

04-04-2016Ankur Biswas

3

Page 4: Understanding Data Flow Diagram

04-04-2016Ankur Biswas 4

Page 5: Understanding Data Flow Diagram

04-04-2016Ankur Biswas 5

Page 6: Understanding Data Flow Diagram

Creating DFDs is a highly iterative process of gradual refinement.

General steps:

1. Create a preliminary Context Diagram

2. Identify Use Cases, i.e. the ways in which users most commonly use the system

3. Create DFD fragments for each use case

4. Create a Level 0 diagram from fragments

5. Decompose to Level 1,2,…

6. Go to step 1 and revise as necessary

7. Validate DFDs with users.

04-04-2016Ankur Biswas 6

Page 7: Understanding Data Flow Diagram

• Context Diagram is showing

whole system as a process.

• Level 0 has added a data store

and major modules are identified

• Note the data flow among entities are restored.

• Numbering has changed to 1,2,3…

• Level 1 & 2 for process 2 & 2.2

are restoring all the data flows

from previous level

• Also note the numbering scheme.

04-04-2016Ankur Biswas 7

Page 8: Understanding Data Flow Diagram

Top-level view of IS

A data flow diagram (DFD) of the scope of anorganizational system that shows the system boundaries, external entities that interact with the system and the major information flows between the entities and the system

Example: Order system that a company uses to enter orders and apply payments against a customer’s balance

04-04-2016Ankur Biswas 8

Page 9: Understanding Data Flow Diagram

One process, numbered 0.

Sources and sinks (external entities) as squares

Main data flows depicted

No internal data stores are shown They are inside the system

External data stores are shown as external entities

How do you tell the difference between an internal and external data store?

04-04-2016Ankur Biswas 9

Page 10: Understanding Data Flow Diagram

• The whole system is shown as a

single process

• All the Entities are displayed

along with respective data flow

• The number of the process is

numbered as 0.

04-04-2016Ankur Biswas 10

Page 11: Understanding Data Flow Diagram

In general, a system could be too complex to understand when viewed as a single Process

We need a Process Decomposition scheme

i.e., to separate a system into its subsystems (sub-processes), which in turn could be further divided into smaller subsystems until the final subsystems become manageable units (i.e., primitive processes!)

A divide and conquer strategy!!

04-04-2016Ankur Biswas 11

Page 12: Understanding Data Flow Diagram

A DFD that represents the primary functional processes in the system at the highest possible level

An Example ...

04-04-2016Ankur Biswas 12

Page 13: Understanding Data Flow Diagram

04-04-2016Ankur Biswas 13

Page 14: Understanding Data Flow Diagram

04-04-2016Ankur Biswas 14

Page 15: Understanding Data Flow Diagram

Functional Decomposition

Balancing

04-04-2016Ankur Biswas 15

Page 16: Understanding Data Flow Diagram

Functional decompositionAn iterative process of breaking a system description down into

finer and finer detail

Uses a series of increasingly detailed DFDs to describe an IS

Act of going from one single system to many component processes

Repetitive procedure

Lowest level is called a primitive DFD

Level-N DiagramsA DFD that is the result of n nested decompositions of a series of

subprocesses from a process on a level-0 diagram

04-04-2016Ankur Biswas 16

Page 17: Understanding Data Flow Diagram

Generic Decomposition Rules:

A process in a DFD could be either a parent process or a child process, or both.

A parent process must have two or more child processes.

A child process may further be decomposed into a set of child processes.

04-04-2016Ankur Biswas 17

Page 18: Understanding Data Flow Diagram

04-04-2016Ankur Biswas 18

Context Diagram

Level-0

Diagram

Page 19: Understanding Data Flow Diagram

When decomposing a DFD, you must conserve inputs to and outputs from a process at the next level of decomposition

Ensures that the input and output data flows of the parent DFD are maintained on the child DFD

This is called balancing

04-04-2016Ankur Biswas 19

Page 20: Understanding Data Flow Diagram

Example: Hoosier Burgers• In Figure 1,

notice that there is one input to the system, the customer order

• Three outputs:• Customer

receipt• Food order• Management

reports

04-04-2016Ankur Biswas 20

Figure 1

Context diagram of Hoosier Burger’s Food ordering

system

Page 21: Understanding Data Flow Diagram

• Notice Figure 2. We

have the same inputs

and outputs

• No new inputs or

outputs have been

introduced

• We can say that the

context diagram and

level-0 DFD are

balanced

04-04-2016Ankur Biswas 21

Figure 2

Level-0 DFD of Hoosier Burger’s food

ordering system

Page 22: Understanding Data Flow Diagram

• Figure 3:• In context diagram,

we have one input to the system, A and one output, B

• Level-0 diagram has one additional data flow, C

• These DFDs are

not balanced

04-04-2016Ankur Biswas 22

SOURCE SINK

(a) Context diagram

(b) Level-0 diagram

SOURCE 1

SINK

0

SOURCE 2

1.0

2.0

A B

A

C

B

Figure 3

An unbalanced set of data flow diagrams

Page 23: Understanding Data Flow Diagram

We can split a data

flow into separate

data flows on a lower

level diagram (see

Figure 4)

Balancing leads to

four additional

advanced rules

04-04-2016Ankur Biswas 23

x.0Payment & coupon

x.1Payment

x.2Coupon

Composite data

flow

Disaggregated

data flow

Page 24: Understanding Data Flow Diagram

Function Process - A function is a set of related activities of the business (e.g., Marketing, Production, etc.)

Event Process - An event process is a logical unit of work that must be completed as a whole. (e.g., Process customer credit verification)

Primitive Process - a primitive process is a discrete, lowest-level activity/task required to complete an event. (e.g., Check the credit card balance)

04-04-2016Ankur Biswas 24

Page 25: Understanding Data Flow Diagram

Function Process - use a Noun!

Event Process - Use a general action verb Process Student registration.

Respond to ...

Generate ...

Primitive Process - use a strong action verbValidate Student ID

Check ...

Calculate ...

04-04-2016Ankur Biswas 25

Page 26: Understanding Data Flow Diagram

No process can have only outputs (a miracle!)

No process can have only inputs (a black hole!)

No process can produce outputs with insufficient inputs ( a gray hole!)

04-04-2016Ankur Biswas 26

Page 27: Understanding Data Flow Diagram

04-04-2016Ankur Biswas 27

3.1.2Create a new

member account

3.1.1 Generate an

Employee bankstatement

3.1.3Freeze memberaccount number

Accounts Receivable Department

Employee

Member Accounts Employees

Existing account

New account status

Employee status

Frozen account notification

Employee address

Bank statement

Membership application

What’s wrong?

Black Hole

Miracle

Gray Hole

Page 28: Understanding Data Flow Diagram

Incorrect Correct

04-04-2016Ankur Biswas 28

Page 29: Understanding Data Flow Diagram

IT HAS TWO KINDS OF

FLOW:

1) Inflow to a Data

Store

(Create/Modify/D

elete)

2) Outflow from a

Data Store (Read)

04-04-2016Ankur Biswas 29

Orders

Process

Order

Cencel

Order

Change

Order

Address

Summarize

Unfilled

Orders

OrderCancelled Order

Change of Address Summary of Orders

New

Order

Address

Unfilled

Order

l

New

Order

Order

to be

Deleted

2

1

2

2

Create

Delete

Modify

Read

1

1

1

2

Page 30: Understanding Data Flow Diagram

Data cannot move directly from one data store to another data store -- it must be moved by a process.

Data cannot move directly from an outside source to a data store -- it must be moved by a process.

Data cannot move directly to an outside sink from a data store -- it must be moved by a process.

You need to use a Noun phrase to label each data flow 04-04-2016Ankur Biswas 30

Page 31: Understanding Data Flow Diagram

Incorrect Correct

04-04-2016Ankur Biswas 31

Page 32: Understanding Data Flow Diagram

Use a singular noun phrase for each data flowEx: customer data, shipping report, …, etc.

Carry logical meaning only, i.e., no implication ondata form or data structure

Minimum flow (no data flooding!!)

Should never be “Unnamed!!” - otherwise, there might be a modeling error.

04-04-2016Ankur Biswas 32

Page 33: Understanding Data Flow Diagram

Process (Event) - Use an Action Verb Phrase Process member order, Generate bank statement, ...

External Agent (Sink/Source) - Use a singular descriptive nounEx: Student, Customer, etc.

Data Store –Use a plural descriptive noun (Members, Customers, etc.)

Or use a noun + file (Inventory file, Goods sold file)

04-04-2016Ankur Biswas 33

Page 34: Understanding Data Flow Diagram

A composite DF on 1 level can be split into component DF as the next level, but no new data can be added n all data in the composite must be accounted for in 1 or more subfollows

The inputs to a process must b sufficient to produce the outputs from the process

At the lowest level of DFD, new data flows may be added to represent data that r transmitted under exceptional condition, these data flows typically represent error message

To avoid having data flow lines cross each other, u may repeat data strores or sources/sinks on a DFD. Use an additional symbol, like a double line on the middle vertical line of data strore symbol, or a diagonal line in a corner of a sink/source square to indicate a repeated symbol

04-04-2016Ankur Biswas 34

Page 35: Understanding Data Flow Diagram

Top-down strategyCreate the high-level diagrams (Context Diagram), then low-level diagrams (Level-0 diagram), and so on

Bottom-up strategyCreate the low-level diagrams, then higher-level diagrams

04-04-2016Ankur Biswas 35

Page 36: Understanding Data Flow Diagram

Made by your seniors –

GPRS – Gunjita, Pooja, Ritwika & Sayanil (AIT – IT – 2012 Batch)

04-04-2016Ankur Biswas

36

Page 37: Understanding Data Flow Diagram

• The whole system is

shown as a single

process

• All the Entities are

displayed along with

respective data flow

• The number of the

process is numbered as

0.

04-04-2016Ankur Biswas 37

©2011-2012. All rights reserved

Fig_DFD_1(CONTEXT LEVEL DFD):COLLEGE AUTOMATION SYSTEM

Page 38: Understanding Data Flow Diagram

Only one mistake is

there – Inflow of

Admin is missing.

You should take care

of such silly mistakes

in your projects…

04-04-2016Ankur Biswas 38©2011-2012. All rights reserved

Fig_DFD_2(LEVEL 0 DFD):COLLEGE AUTOMATION SYSTEM

Page 39: Understanding Data Flow Diagram

Always keep in mind to

increment the levels on

the basis of processes and

not entities…

04-04-2016Ankur Biswas 39©2011-2012. All rights reserved

Fig_DFD_3(LEVEL 1 DFD):ADMINISTRATION SYSTEM

Page 40: Understanding Data Flow Diagram

04-04-2016Ankur Biswas 40©2011-2012. All rights reserved

Fig_DFD_4(LEVEL 2 DFD):ATTENDANCE PROCESSING SYSTEM

Page 41: Understanding Data Flow Diagram

04-04-2016Ankur Biswas 41©2011-2012. All rights reservedFig_DFD_5(LEVEL 1 DFD):STUDENT DETAILS PROCESSING SYSTEM

Page 42: Understanding Data Flow Diagram

In case the inflow and

outflow is to or from

another process outside the

considered process, then

only arrow need to be

shown.

If processes are interacting

with entities then that

should be show in the

diagram.

04-04-2016Ankur Biswas 42©2011-2012. All rights reserved

Fig_DFD_6(LEVEL 2 DFD):STUDENT REGISTRATION SYSTEM

Page 43: Understanding Data Flow Diagram

04-04-2016Ankur Biswas

43