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

Lect6 Dfd Tutorial

Embed Size (px)

Citation preview

Page 1: Lect6 Dfd Tutorial

CS451 - Lecture 61

CS451Topic 6: DFD Tutorial

Yugi LeeSTB #555(816) [email protected]/~leeyu

Page 2: Lect6 Dfd Tutorial

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

Page 3: Lect6 Dfd Tutorial

3CS451 - Lecture 6

Data Flow Modeling Notation

external entityexternal entity

processprocess

data flowdata flow

data storedata store

Page 4: Lect6 Dfd Tutorial

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

Page 5: Lect6 Dfd Tutorial

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

Page 6: Lect6 Dfd Tutorial

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 numbertype, type, location, agelocation, age

Page 7: Lect6 Dfd Tutorial

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

Page 8: Lect6 Dfd Tutorial

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

Page 9: Lect6 Dfd Tutorial

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

Page 10: Lect6 Dfd Tutorial

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

Page 11: Lect6 Dfd Tutorial

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

Page 12: Lect6 Dfd Tutorial

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

Page 13: Lect6 Dfd Tutorial

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.

Page 14: Lect6 Dfd Tutorial

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

Page 15: Lect6 Dfd Tutorial

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 me m b e rd a t a

Page 16: Lect6 Dfd Tutorial

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

Page 17: Lect6 Dfd Tutorial

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 me m b e rd a ta

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

Page 18: Lect6 Dfd Tutorial

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

Page 19: Lect6 Dfd Tutorial

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 mb e r M a s te ro rd e r me m b e rd a ta

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

me m b e ro rd e r

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

Page 20: Lect6 Dfd Tutorial

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 -me m b e r)

D -1 M e m b e r M a s t e ro rd e r me 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 rdersO 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

Page 21: Lect6 Dfd Tutorial

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

Page 22: Lect6 Dfd Tutorial

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 mb 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 rdersO R Clerk

v e rifie dme 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 rint invo ic eand

shipp ing lis tO 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

Page 23: Lect6 Dfd Tutorial

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