© 2010 bennett, mcrobb and farmer1 data flow diagrams supplementary material to support bennett,...

26
© 2010 Bennett, McRobb and Farmer 1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design Using UML, (4th Edition), McGraw Hill, 2005.

Upload: robert-lamb

Post on 26-Mar-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

© 2010 Bennett, McRobb and Farmer 1

Data Flow Diagrams

Supplementary material to support Bennett, McRobb and Farmer:

Object Oriented Systems Analysis and Design Using UML, (4th Edition),

McGraw Hill, 2005.

Page 2: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

2

© 2010 Bennett, McRobb and Farmer

In This Presentation You Will Learn:

• What data flow diagrams (DFDs) are

• What DFDs can be used for

• Why DFDs are not used in object-oriented analysis and design

• Variations in notation for DFDs

Page 3: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

3

© 2010 Bennett, McRobb and Farmer

What are DFDs?

• Data flow diagrams (DFDs) are one of the diagramming techniques used in structured systems analysis and design

• Data flow diagrams show:– Data flowing through a system to or from

users (external entities)– The processes that transform the data– The data stores that hold the data

Page 4: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

4

© 2010 Bennett, McRobb and Farmer

What do DFDs look like?

2.4Check

CampaignBudget

CampaignManager

Client name + Campaign name

Budget surplus

Campaigns Adverts

Budget Cost

Page 5: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

5

© 2010 Bennett, McRobb and Farmer

Elements of DFDs

• External Entities– People, organizations or systems that the

system being modelled communicates with– Rather like actors, except an external entity is

not necessarily a direct user of the system– Typically trigger processes

CampaignManager

Page 6: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

6

© 2010 Bennett, McRobb and Farmer

Elements of DFDs

• Processes– Processes that transform data in

some way– Named and numbered– Normally require at least one input

and produce at least one output– Inputs / outputs (I/O) may flow to or

from other processes, data stores or external entities

2.4Check

CampaignBudget

Page 7: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

7

© 2010 Bennett, McRobb and Farmer

Elements of DFDs

• Data Stores– Represent the places where data is stored– Typically files or database tables– In a manual system can represent physical

data stores, like card indexes or filing systems

Campaigns

Page 8: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

8

© 2010 Bennett, McRobb and Farmer

Elements of DFDs

• Data Flows– Flows of data between:

• external entities and processes• processes and other processes• processes and data stores

– Can be simple data elements or complex data structures

Client name + Campaign name

Page 9: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

9

© 2010 Bennett, McRobb and Farmer

Data Dictionaries

• DFDs are supported by data dictionary entries• Each element is defined in a data dictionary

– Data elements - name and data type– Data structures - name and composition– Data flows - name and content– Data stores - name and data structures contained– Processes - name and specification of the process,

for example in Structured English

Page 10: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

10

© 2010 Bennett, McRobb and Farmer

Levels of DFDs

• Context Diagram– Shows the system and the external entities

with which it interacts

• Top Level Diagram– Shows the main processes in the system - a

decomposition of the context diagram process

• Lower Level Diagrams– Decomposition of the processes in the top

level - can be successively decomposed

Page 11: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

11

© 2010 Bennett, McRobb and Farmer

Context Diagram

Agate Campaign

ManagementSystem

CampaignManager

Client

Budget

CampaignStaff

Campaign

Advert

Staff Assignment

Accountant

Concept Note

StaffConcept Note

Staff

Staff Grade

StaffContact

Payment

Advert Completion

Client Contact

Page 12: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

12

© 2010 Bennett, McRobb and Farmer

Top Level Diagram (Level 0)

1.Record Clients

CampaignManager

Client

Staff Assignment

CampaignStaff

Campaign

Advert

Accountant

Concept Note

Staff

ConceptNote

Staff

Staff Grade

StaffContact

Payment

Advert Completion

Client Contact

3.PrepareAdverts

Notes

6.BrowseConcept

NotesConcept

Note

Concept Note

4.Maintain

Staff

5.ManageAdverts

Adverts

Advert

Contact+ Completion Date

Clients

Client

2.Plan andManage

Campaigns

Staff Members

Staff

Budget

Cost

ConceptNote

Campaigns

Campaign

StaffStaff

Page 13: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

13

© 2010 Bennett, McRobb and Farmer

Level 1 Diagram

Advert Completion

Client Contact

5.1Set Client

Contact

Adverts

Contact

Staff Members

Staff

Completion Date5.2Set AdvertCompleted

Page 14: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

14

© 2010 Bennett, McRobb and Farmer

Data Dictionary

• Advert Completion = Advert Name + Completion Date

• Advert Name = Name of advert. Format: X(40)

• Completion Date = Date on which advert was completed. Format: dd/mm/yyyy.

Page 15: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

15

© 2010 Bennett, McRobb and Farmer

Data Dictionary

• Client Contact = Staff ID + Advert Name

• Staff = Staff ID + First Name + Last Name + Start Date + Grade + Date Of Birth

• Staff Members = {Staff}

• Contact = Staff ID

Page 16: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

16

© 2010 Bennett, McRobb and Farmer

Process Definition

Process 5.1 Set Client Contact

BEGIN

FIND Staff in Staff Members with Staff ID that matches Staff ID in Client Contact

Contact = Staff ID

Write Contact to Adverts using Advert Name

END

Page 17: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

17

© 2010 Bennett, McRobb and Farmer

Types of DFD

• In some approaches different kinds of DFD are produced:– Current physical - existing system with

physical stores, manual processes and physical descriptions of I/O

– Current logical - abstraction of current physical to eliminate “the way it’s done now”

– Proposed logical - proposed new system

Page 18: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

18

© 2010 Bennett, McRobb and Farmer

What DFDs can be used for

• Modelling existing systems that are to be re-engineered using an object-oriented approach

• Modelling data flows in systems that do no more than transform data

• Modelling business processes in existing manual systems

• Determining the automation boundary for a system (what is to be computerized)

Page 19: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

19

© 2010 Bennett, McRobb and Farmer

Why DFDs aren’t used in O-O

• In DFDs a clear separation is made between processes and stored data

• It is assumed that all data is ‘visible’ to any process that needs to access it

• In an O-O system the processes that operate on data are the methods of the classes that contain the data as attributes

• Data is encapsulated within objects, and may be hidden too

Page 20: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

20

© 2010 Bennett, McRobb and Farmer

Variations in Notation

• We have used the notation from Yourdon (1989) because it is the simplest to draw!

• Alternatives include – Structured Analysis and Design Technique

(SADT)– Structured Systems Analysis and Design

Method (SSADM)

Page 21: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

21

© 2010 Bennett, McRobb and Farmer

SADT

2.4 Check

CampaignBudget

CampaignManager

Client name + Campaign name

Budget surplus

Campaigns Adverts

Budget Cost

Page 22: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

22

© 2010 Bennett, McRobb and Farmer

SSADM

2.4

Check Campaign

Budget

CampaignManager

Client name + Campaign name

Budget surplus

D1 Campaigns D2 Adverts

Budget Cost

Page 23: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

23

© 2010 Bennett, McRobb and Farmer

SSADM

• SSADM probably has the most complex notation, which we have not covered here, including:– Flows and stores of physical materials– Notation for duplicate elements appearing in

the same diagram– Special numbering systems for manual and

transient data stores

Page 24: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

24

© 2010 Bennett, McRobb and Farmer

Other Structured Techniques

• In a structured approach, data structures are usually modelled separately in an Entity-Relationship Diagram (ERD), but ERDs don’t show processes

• Entity Life Histories show the events that affect entities over time

• Structure Diagrams show program structure as a tree hierarchy of modules

Page 25: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

25

© 2010 Bennett, McRobb and Farmer

Summary

In this presentation you have learned about:

• What data flow diagrams (DFDs) are

• What DFDs can be used for

• Why DFDs are not used in object-oriented analysis and design

• Variations in notation for DFDs

Page 26: © 2010 Bennett, McRobb and Farmer1 Data Flow Diagrams Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis and

26

© 2010 Bennett, McRobb and Farmer

References

• Yourdon (1989)

• Skidmore, Mills and Farmer (1994)(For full bibliographic details, see Bennett,

McRobb and Farmer)