Вы находитесь на странице: 1из 23

CS451 Topic 6: DFD Tutorial

Yugi Lee STB #555


(816) 235-5932 leeyu@umkc.edu www.sice.umkc.edu/~leeyu

CS451 - Lecture 6

The Data Flow Model

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

input

computer based system

output

CS451 - Lecture 6 2

Data Flow Modeling Notation

external entity

process data flow

data store

CS451 - Lecture 6 3

External Entity & Process


External Entity: A producer or consumer of data

Data must always originate somewhere and must always be sent to something e.g., a person, a device, a sensor, computer-based system
Process: A data transformer (changes input to output) Data must always be processed in some way to achieve system function e.g., compute taxes, determine area, format report, display graph
CS451 - Lecture 6 4

Data Flow

Data flows through a system, beginning as input and be transformed into output.
base compute triangle area area

height

CS451 - Lecture 6 5

Data Stores

Data is often stored for later use.


sensor # look-up sensor data sensor number sensor #, type, location, age type, location, age

report required

sensor data

CS451 - Lecture 6 6

Constructing a DFDI
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
user

processing request
digital video processor

requested video signal

monitor

video source

NTSC video signal

CS451 - Lecture 6 7

Constructing a DFDII
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

CS451 - Lecture 6 8

The Data Flow Hierarchy

level 0

c
p1

p2

f
p4

d level 1

p3

CS451 - Lecture 6 9

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
CS451 - Lecture 6 10

Data Flow Diagrams (DFDs)


Advantages for systems view, working with users:
(1) External Entity - source and destination of data (2) Process

(3) Data Store (4) Data Flow

CS451 - Lecture 6 11

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

CS451 - Lecture 6 12

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.
CS451 - Lecture 6 13

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

CS451 - Lecture 6 14

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
1
EE-1 Record Club Member

order

Verify member status


OR Clerk

member data

D-1 Member Master

EE-2 Customer (non-member)

CS451 - Lecture 6 15

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

CS451 - Lecture 6 16

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
1
EE-1 Record Club Member

order

Verify member status OR Clerk

member data

D-1 Member Master

EE-2 Customer (non-member)

non-member order and application form

CS451 - Lecture 6

17

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

CS451 - Lecture 6 18

DFD Example: Step 4


FOURTH SENTENCE: If the customer is a member, the clerk verifies the order item data by checking the Item file. 1 RESULT: Verify member status Bebop Records Order OR Clerk Processing
EE-1

order

Record Club Member

member data

D-1 Member Master

EE-2 Customer (non-member)

member order

non-member order and application form

Verify order item data


OR Clerk

item data

D-2 Item Master

CS451 - Lecture 6 19

DFD Example: Step 5


FIFTH SENTENCE: Then the clerk enters the order data and saves it to the Daily Orders file. RESULT:
1
EE-1 Record Club Member

order

Verify member status


OR Clerk

member data

D-1 Member Master

EE-2 Customer (non-member)

member order

non-member order and application form

Verify order item data


OR Clerk
verified member order

item data

D-2 Item Master

3 Enter order into Daily Orders OR Clerk


order

D-3

Daily Orders Detail

CS451 - Lecture 6 20

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

CS451 - Lecture 6 21

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 Record Club Member

order

Verify member status OR Clerk

member data

D-1 Member Master

EE-2 Customer (non-member)

member order

non-member order and application form

2 Verify order item data


OR Clerk
verified member order
item data

D-2 Item Master

Enter order into Daily Orders OR Clerk

order

D-3

Daily Orders Detail

order data

4
Print invoice and shipping list Lecture 6 OR Clerk
EE-3 invoice and shipping list Order Fulfillment

CS451 22

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

CS451 - Lecture 6 23