CS451 - Lecture 6 1 CS451 Topic 6: DFD Tutorial Yugi Lee STB #555 (816) 235-5932 [email protected]...

23
CS451 - Lecture 6 1 CS451 Topic 6: DFD Tutorial Yugi Lee STB #555 (816) 235-5932 [email protected] www.sice.umkc.edu/~leeyu

Transcript of CS451 - Lecture 6 1 CS451 Topic 6: DFD Tutorial Yugi Lee STB #555 (816) 235-5932 [email protected]...

CS451 - Lecture 61

CS451Topic 6: DFD Tutorial

Yugi Lee

STB #555(816) 235-5932

[email protected]

www.sice.umkc.edu/~leeyu

2CS451 - Lecture 6

The Data Flow Model

Every computer-based system is an Every computer-based system is an information transform ....information transform ....

computercomputerbasedbased

systemsysteminputinput outputoutput

3CS451 - Lecture 6

Data Flow Modeling Notation

external entityexternal entity

processprocess

data flowdata flow

data storedata store

4CS451 - Lecture 6

External Entity: A producer or consumer of data

•Data must always originate somewhere and must always Data must always originate somewhere and must always be sent to something e.g., be sent to something e.g., a person, a device, a sensor, a person, a device, a sensor, computer-based systemcomputer-based system

Process: A data transformer Process: A data transformer (changes input to output)(changes input to output)

•Data must always be processed in some way to achieve Data must always be processed in some way to achieve system function e.g., system function e.g., compute taxes, determine area, compute taxes, determine area, format report, display graph format report, display graph

External Entity & Process

5CS451 - Lecture 6

Data Flow

Data flows through a system, beginningData flows through a system, beginningas input and be transformed into output.as input and be transformed into output.

computecomputetriangle triangle

areaarea

basebase

heightheight

areaarea

6CS451 - Lecture 6

Data Stores

Data is often stored for later use.Data is often stored for later use.

look-uplook-upsensorsensor

datadata

sensor #sensor #

report requiredreport required

sensor #, type, sensor #, type, location, agelocation, age

sensor datasensor data

sensor numbersensor number

type, type, location, agelocation, age

7CS451 - Lecture 6

Constructing a DFD—I

• review ERD to isolate data objects and grammatical parse to determine “operations)

• determine external entities (producers and consumers of data

• create a level 0 DFD

useruserprocessing processing

requestrequest

videovideosourcesource NTSCNTSC

video signalvideo signal

digitaldigitalvideovideo

processorprocessor

requestedrequestedvideovideosignalsignal

monitormonitor

8CS451 - Lecture 6

Constructing a DFD—II

• write a narrative describing the transform

• parse to determine next level transforms

• “balance” the flow to maintain data flow continuity

• develop a level 1 DFD– use a 1:5 (approx.) expansion ratio

9CS451 - Lecture 6

The Data Flow Hierarchy

PPaa bbxx yy

p1p1p2p2

p3p3p4p4 55

aa

bb

cc

ddee

ff

gg

level 0level 0

level 1level 1

10CS451 - Lecture 6

Data Flow Diagrams (DFDs)

• Analysis tool

• System modeling

• Excellent documentation tool

• Data flow, aka, business process

• Provide a way to see the pattern– Systems Thinking– Systems View– Systems Approach

11CS451 - Lecture 6

Data Flow Diagrams (DFDs)

• Advantages for systems view, working with users:(1) External Entity - source and

destination ofdata

(2) Process

(3) Data Store

(4) Data Flow

12CS451 - Lecture 6

Data Flow Diagrams (DFDs)

• Simple rule:– left to right, top to bottom, basically (like English)– Show all processes– data flows must start or end in a process– beware of black holes - every process and data store

must produce data– no “magic processes” - must enter all needed data to

get data out

13CS451 - Lecture 6

DFD Example

Bebop Records is a mail-order company that distributes CDs and tapes at discount price to record-club members. When an order processing clerk receives an order form, he or she verifies that the sender is a club member by checking the Member file. If the sender is not a member, the clerk returns the order along with a membership application form. If the customer is a member, the clerk verifies the order item data by checking the Item file. Then the clerk enters the order data and saves it to the Daily Orders file. The clerk also prints an invoice and shipping list for each order, which are forwarded to Order Fulfillment.

14CS451 - Lecture 6

DFD Example: Step 1

FIRST SENTENCE:

Bebop Records is a mail-order company that distributes CDs and tapes at discount price to record-club members.

RESULT: initial title

Bebop Records

15CS451 - Lecture 6

DFD Example: Step 2

SECOND SENTENCE:

When an order processing clerk receives an order form, he or she verifies that the sender is a club member by checking the Member file.

RESULT:

Bebop Records Order Processing

EE-1

R e c o rd C lu bM e m b e r

1

Verify m em bers tatus

O R Clerk

EE-2

C u s t o m e r(n o n -m e m b e r)

D -1 M e m b e r M a s t e ro rd e r m e m b e rd a t a

16CS451 - Lecture 6

DFD Example: Step 2 (cont)

SECOND SENTENCE:

When an order processing clerk receives an order form, he or she verifies that the sender is a club member by checking the Member file.

RULES FOLLOWED:

• left to right, top to bottom

• data flows start or end in a process

17CS451 - Lecture 6

DFD Example: Step 3

THIRD SENTENCE:

If the sender is not a member, the clerk returns the order along with a membership application form.

RESULT:

Bebop Records Order Processing

EE-1

R e c o rd C lu bM e m b e r

1

Verify m em bers tatus

O R Clerk

EE-2

C u s t o m e r(n o n -m e m b e r)

D -1 M e m b e r M a s t e ro rd e r m e m b e rd a t a

n o n -m e m b e r o rd e ra n d a p p lic a t io n fo rm

18CS451 - Lecture 6

DFD Example: Step 3 (cont)

THIRD SENTENCE:

If the sender is not a member, the clerk returns the order along with a membership application form.

RULES FOLLOWED:

• shows all processes without conditions

19CS451 - Lecture 6

DFD Example: Step 4

FOURTH SENTENCE:

If the customer is a member, the clerk verifies the order item data by checking the Item file.

RESULT:

Bebop Records Order

Processing

EE-1

R e c o rd C lu bM e m b e r

1

Verify m em bers tatus

O R Clerk

EE-2

C u s t o m e r(n o n -m e m b e r)

D -1 M e m b e r M a s t e ro rd e r m e m b e rd a t a

n o n -m e m b e r o rd e ra n d a p p lic a t io n fo rm

2

Verify orderitem data

O R Clerk

m e m b e ro rd e r

D -2 It e m M a s t e rit e md a t a

20CS451 - Lecture 6

DFD Example: Step 5

FIFTH SENTENCE:

Then the clerk enters

the order data and saves

it to the Daily Orders file.

RESULT:

EE-1

R e c o rd C lu bM e m b e r

1

Verify m em bers tatus

O R Clerk

EE-2

C u s t o m e r(n o n -m e m b e r)

D -1 M e m b e r M a s t e ro rd e r m e m b e rd a t a

n o n -m e m b e r o rd e ra n d a p p lic a t io n fo rm

2

Verify orderitem data

O R Clerk

m e m b e ro rd e r

D -2 It e m M a s t e rit e md a t a

3

Enter orderin to D aily

O rders

O R Clerk

v e rifie dm e m b e r

o rd e r

D -3 D a ily O rd e rs D e t a ilo rd e r

21CS451 - Lecture 6

DFD Example: Step 5 (cont)

FIFTH SENTENCE:

Then the clerk enters the order data and saves it to the Daily Orders file.

RULES FOLLOWED:

• left to right, top to bottom

• data flows start or end in a process

22CS451 - Lecture 6

DFD Example: Step 6

SIXTH SENTENCE:

The clerk also prints

an invoice and shipping

list for each order, which

are forwarded to

Order Fulfillment.

EE-1

R e c o rd C lu bM e m b e r

1

Verify m em bers tatus

O R Clerk

EE-2

C u s t o m e r(n o n -m e m b e r)

D -1 M e m b e r M a s t e ro rd e r m e m b e rd a t a

n o n -m e m b e r o rd e ra n d a p p lic a t io n fo rm

2

Verify orderitem data

O R Clerk

m e m b e ro rd e r

D -2 It e m M a s t e rit e md a t a

3

Enter orderin to D aily

O rders

O R Clerk

v e rifie dm e m b e r

o rd e r

D -3 D a ily O rd e rs D e t a ilo rd e r

4

P rin t invoic eand

s hipping lis t

O R Clerk

o rd e rd a t a

EE-3

O rd e rF u lfillm e n t

in v o ic e a n ds h ip p in g lis t

23CS451 - Lecture 6

DFD Example: Step 6 (cont)

SIXTH SENTENCE:

The clerk also prints an invoice and shipping list for each order, which are forwarded to Order Fulfillment.

RULES FOLLOWED:

• left to right, top to bottom

• data flows start or end in a process

• shows all processes without conditions

• beware of black holes - every process and data store must produce data