Top Banner
DFD = Data Flow Diagram - A graphical representation of a system or a portion of a system in the form of a diagram illustrating external sources, flows, processes and data stores - Data flow: ‘data in motion, moving from one place to another. A data flow could represent data on a customer order form or a payroll check’ Hoffer et al (2002) - DFDs describe an entire system from the viewpoint of the data that is processed by the system - Using DFDs o We can identify the main processes and activities (subsystems) o We can decompose each subsystem into constituent subsystems or processes until we have a complete set of diagrams for the system which cannot be decomposed further o This set of non-decomposable diagrams is a model of the system - Two types of DFDs: o Physical Data Flow Diagrams o Implementation-depended o They show actual devices, departments, people, etc involved in the system o Logical Data Flow Diagrams o Implementation-independed o They show what takes place rather than how an activity is accomplished - WHAT the system does → Current Physical DFD HOW it does it → Current Logical DFD WHAT it should do → Required Logical DFD HOW it should do it → Required Physical DFD - Both DFD types support a top-down approach o Analysts begin by developing a general understanding of the system o And gradually explode components in greater detail - A DFD models the process and functional view of a system - DFDs depict information flow and the transformations that are applied as data move from input to output - DFDs include 1
21

DFD

Nov 18, 2014

Download

Documents

evy_x

Lessius Handelswetenschappen Informatiemanagement II DFD
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DFD

DFD

= Data Flow Diagram

- A graphical representation of a system or a portion of a system in the form of a diagram illustrating external sources, flows, processes and data stores- Data flow: ‘data in motion, moving from one place to another. A data flow could represent data on a customer order form or a payroll check’ Hoffer et al (2002)- DFDs describe an entire system from the viewpoint of the data that is processed by the system- Using DFDs

o We can identify the main processes and activities (subsystems)o We can decompose each subsystem into constituent subsystems or

processes until we have a complete set of diagrams for the system which cannot be decomposed further

o This set of non-decomposable diagrams is a model of the system

- Two types of DFDs:o Physical Data Flow Diagrams

o Implementation-dependedo They show actual devices, departments, people, etc involved in the

systemo Logical Data Flow Diagrams

o Implementation-independedo They show what takes place rather than how an activity is

accomplished- WHAT the system does → Current Physical DFD HOW it does it → Current Logical DFD WHAT it should do → Required Logical DFD HOW it should do it → Required Physical DFD- Both DFD types support a top-down approach

o Analysts begin by developing a general understanding of the systemo And gradually explode components in greater detail

- A DFD models the process and functional view of a system- DFDs depict information flow and the transformations that are applied as data move from input to output- DFDs include

o The processes themselves (the activities or functions of the system)o The information or data flowing into, our and within the systemo The way information is stored in the system

Data flow diagram key

1

Page 2: DFD

Source die geeft iets, de bron van ietsSink is waar je iets laat toekomenCirkel = een entiteit

Data flow → gaat aangeven welke informatie door systeem vloeit

Voorbeeld Slide 9Passenger: entiteit geeft iets en komt terecht in proces→ geeft zowel informatie door als ontvangtData process → geeft informatie door aan data store

Data Flow Diagrams

- DFDs consist of 4 basic elements:o Data flowo Data storeo Processo Source / sink

- We can also useo A note (for convenience)o A resource flow (for convenience)o A process specification

Symbols used in DFDs

Processing step (process)o Represents an activity that processes / transforms data (a set of activities

transforming input data to output data)o The process plays a significant role in the business processo Labeling processes is used to develop levels of DFDs that describe

increasingly detailed levels of a processo Each process has an unique IDo Diagram does not show who is performing a processo If a process exists on a diagram it does not mean that it is always performed

2

Page 3: DFD

Naming conventions:o Verbal noun + object: preparing an invoice, accepting articles, calculating

monthly salaries, checking warehouse stateo Imperative verb + object: prepare invoice, accept articles, calculate monthly

salaries for a month, check warehouse state

Data flowo Represents the flow of data / information from an External Entity, Process or

Data Store to an External Entity, Process or Data Storeo The name reflects the nature of the data / information usedo Does not show how data / information flows but rather which data /

information flowso Use lower case

Data storeo A collection of data needed by the business processo It is not the same as a databaseo Types: file on a disk, table in a database, paper files, sheet of paper, book,

folder with files, othero In data store we store data about a single object typeo Some Data Stores may only be temporary - that is, they exist only for as long

as the process needs them

Naming conventions:o Noun in singular: client, invoice, commodity, student, group, employee, …o Noun in plural: clients, invoices, commodities, students, groups, employees, …

3

Page 4: DFD

Source or sinko A source represents a “data source” outside the boundary of the process that

the DFD is modellingo A sink is any destination for data that is outside the boundary of the process

that the DFD is modellingo Is something or somebody (person, department, organization, another system)

being outside the systemo Is a sender or recipent of datao Also called external entitieso Usually we do not know their behaviour – we do not need ito What happens to the data - either before entering or after leaving the system -

is immaterialo In DFD never use names for persons

Naming conventions:o Noun in singular [capitals]: client, sales department, manager, supplier,

treasury office, bank, accountancy system, orders system

Resource flowo Shows the flow of any physical material from its source to its destinationo Often called the physical flowso Resource flows are usually restricted to early, high-level diagrams and are

used when a description of the physical flow of materials is considered to be important to help the analysis

o [dubbele pijl]o Alles wat echt fysisch is

4

Page 5: DFD

Noteso Are used to add a description on the diagram for an objecto Connect a note to any object using a note link

Complex DFDs

Decomposing Data Flow Diagrams

- Complex systems require a complete set of DFDs to describe all information flows and processes

o Mulitlevel DFDo Hierarchical structureo Consists of a set of related diagramso Model levels:

o Context diagramo First level diagram → hoofdprocessen tekeneno Second level diagram

- The amount of processes in one diagram is limited to 10 (guideline: 7)

- Level 0 / Context Diagram

5

Page 6: DFD

o Shows the boundries for a system – contexto Contains:

o 1 processo All external entitieso No data stores

Hier zijn de dataflows heel algemeen (voorbeeld)

- Level 1 contains:o All external entities from the higher levelo All incoming flows of the higher level (and more)o Data storeso Some processes (numbered 1, 2, 3, ..., n)

→ Shows how the single process from context diagram is decomposed to detailed processes – process decomposition

- Level N + 1o All terminators from the higher level

6

Page 7: DFD

o All incoming and outgoing flows of the higher levelo Additional data stores when necessaryo More detailed processes (numbered N.1, N.2, N.3, …, N.n)

- Level 2 for process A

Guidelines For Drawing DFDs

- Identify input and output of the system (mostly information on documents) together with their sources and recipients- Identify the main processes which need input and produce output- Draw the data flows and external entities, defined above, round the outside of the page- For each data flow on the diagram, identify and draw any associated data store with their data flows- Look for any intermediate processes. Add data flows and data stores, required by those processes- Check the diagram for consistency and completeness

Rules for Drawing DFDs

- Each process should have both input and output- Each data store probably has both input and output- Data flows cannot flow between data stores- Data flows cannot flow between entities and data stores- Diagrams must be balanced across levels- A data flow cannot be output and input of the same process

7

Page 8: DFD

- Flows connected with a process with opposite directions should not have the same name (data not processed?)- Data flows should not cross one another

- Data flows should not cross one another → Oplossen door een 'brug' te tekenen

- Each diagram has a name (title)- Each object has a name- Unique names for: processes, terminators, data stores- Name of each object should precisely reflect its features- Names of object usually do not point to specific occurrences of objects

Process specification

8

Page 9: DFD

Example: The Sailboat Rental Company

- In the following example, a DFD will be created based on a few paragraphs about a sailboat rental company’s method of renting boats.- In this example, the information necessary to create the DFD is provided for us. In Real Life, this information comes from extensive interviewing, document gathering, and other research.- Depending upon the system being studied, the number of people working on it, etc., the development of a detailed DFD can take anywhere from a few hours to several months- For each sailboat, a filing card is made up with technical information, the state of the boat and the required level of ability to be safely sailed- Each customer has his own filing card with his address, his unique customerID and his skill level to sail boats- To rent a boat customers give their customerID and the boatID of the desired boat- The system checks that the boat is free and that the customer has the correct skill level.- A rental contract is signed by the customer- The rental fee of the boat is paid immediately- Before sailing out the customer gets a document with the state of the boat- When the boat is brought back, the state of the boat is checked again. If necessary the customer gets a damage report and an invoice to pay the damage- If the invoice is not paid within one month, a reminder is sent- The SRC management wants each quarter an overview of the number of times a customer has rented a boat, the number of times each boat has been rented

- Customer gives:o Customer detailso CustomerID-BoatIDo Rental freeo Damage report

- Management receives:o Mangement reports

- Customer receives:o CustomerIDo State of boat information / document state of boato Damage report information / damage reporto Payment information (data flow) / invoice (resource)

- Processeso 1.0: Record Customer Infoo 2.0: Record Rento 3.0: Finish Rento 4.0: Check Invoiceso 5.0: Report Management

- Data storeso Boat cardso Customer cardso Invoices

9

Page 10: DFD

o Contracts

Customer and manager zover mogelijk uit elkaar tekenen→ Level 0 / context

10

Page 11: DFD

Processen erbij tekenen→ Level 1

Datastores tekenen→ Level 2

Nummering van levels hebben niet altijd noodzakelijk een logische volgorde

What DFDs Do Not Do

- DFDs do not handle sequence

11

Page 12: DFD

o There is no notion of time in DFDo It cannot be infered that process 2 always folows process 1

- DFDs do not handle prioritieso In a situation where 2 processes want to read from the same file at the same

time, which one wins? DFDs do not adress the problem- DFDs do not define the structure of the data

o The structure of the data in the data stores is glossed over in DFDs and any structure of the data in data flows is similarly ignored in DFDs

o The structure of the data is left of the data view of the system

Some common mistakes

Shortcomings of Process-Based Methods

- The focus of the developers was to understand the users' business and produce the reports and screens they needed to see. DFDs are a great help in doing this- What was less urgent, but in the long run more important, is the ability to make changes to the system when the users' needs change. There is no such thing as a stable business- A simple change in the output is likely to cause a cascade of changes to all parts of the program or system

Exercises

12

Page 13: DFD

- What are the components of a DFD?- What is wrong with the following process?

- What is wrong with the following process?

- What is wrong with the following DFDs?

- Is the DFD correct? What does it mean?

13

Page 14: DFD

- Which DFDs are correct? Explain your answer

- What is wrong with the following DFD?

→ Antwoorden zelf op toledo zetten, zij antwoordt daar dan op (worden niet rechtstreeks gegeven)

- What is the meaning of an unnamed data flow flowing in or out a data store?- What kind of mistake do users sometimes make with interpreting the process numbers?- Suppose someone labels a process with the name of the person which executes the process at this moment. Why is this an incorrect label?- Is it necessary to partition all processes in a certain level in exactly the same sublevels?

- Travelling salespersons try to sell vacuum cleaners from door to doorWhenever they sell one, they immediately receive the price in cash (€75)They deposit the full amount on the firm’s bank accountAt the end of each month the firm pays out a 25% commissionDraw a DFD

- An industrial firm issues a call for tender to several different IT companiesThe firm wants to automate the accountancy departmentImmediately after receiving a tender, confirmation of reception is sentThe cheapest bidder may deliver the system, the others receive a polite refusalPayment takes place after delivering and acceptance testingDraw a DFD

Process specification

14

Page 15: DFD

- Complex DFDs are decomposed until the process cannot be decomposed further- These processes are tasks that have to be implemented

o DFD modeling results in specifications for program units- With process specification, we can formally describe (and define) the low level units which make up the target system

o The notation used must be able to describe the step-by-step flow and logic within the process

o The formal definition of the process / unit is usually in a format which is easily (and often mechanically) translatable into program code

o Thus we can specify the (typically) small pieces of code, or units, which will eventually be linked together to form the programs which will be the software of the target system

- A DFD process tells us WHAT the process (activity) is (by its name in the box)- The process description will deal with the HOW

15

Page 16: DFD

- Pseudocode

- Pseudocode can include sequences, selections, and iterations- Decision Trees and Decision Tables provide help with the selections and appropriate actions

16

Page 17: DFD

- Alternative format for a decision tree

- Decision tableso 5 decisions → 25 rules = 32 rules

- Decision tables (rationalized)

17

Page 18: DFD

18