14
Data Flow Diagram Tutorial/Lab Exercise A Data Flow Diagram (DFD) is also known as a Process Model. Process Modeling is an analysis technique used to capture the flow of inputs through a system (or group of processes) to their resulting output. The model is fairly simple in that there are only four types of symbols – process, dataflow, external entity, data store. Process Modeling is used to visually represent what a system is doing. It is much easier to look at a picture and understand the essence than to read through verbiage describing the activities. System Analyst after talking with various users will create DFD diagrams and then show them to users to verify that their understanding is correct. The process models can be created to represent an existing system as well as a proposed system. The following clarifies what each symbol in Process Modeling represents; the information is taken from out textbook on pages 218 : Process – An activity or a function that is performed for some specific reason; can be manual or computerized; ultimately each process should perform only one activity Data Flow – single piece of data or logical collection of information like a bill Data Store – collection of data that is permanently stored External Entity – A person, organization, or system that is external to the system but interacts with it Be aware of the basic rules for Process Modeling: 1. A series of data flows always starts or ends at an external agent and starts or ends at a data store. Conversely, this means that a series of data flows can not start or end at a process. Prepared by Ms Atiya

Data Flow Diagram Tutorial

Embed Size (px)

Citation preview

Page 1: Data Flow Diagram Tutorial

Data Flow Diagram Tutorial/Lab Exercise

A Data Flow Diagram (DFD) is also known as a Process Model. Process Modeling is an analysis technique used to capture the flow of inputs through a system (or group of processes) to their resulting output. The model is fairly simple in that there are only four types of symbols – process, dataflow, external entity, data store. Process Modeling is used to visually represent what a system is doing. It is much easier to look at a picture and understand the essence than to read through verbiage describing the activities. System Analyst after talking with various users will create DFD diagrams and then show them to users to verify that their understanding is correct. The process models can be created to represent an existing system as well as a proposed system.

The following clarifies what each symbol in Process Modeling represents; the information is taken from out textbook on pages 218:Process – An activity or a function that is performed for some specific reason; can be manual or computerized; ultimately each process should perform only one activity

Data Flow – single piece of data or logical collection of information like a bill

Data Store – collection of data that is permanently stored

External Entity – A person, organization, or system that is external to the system but interacts with it

Be aware of the basic rules for Process Modeling:1. A series of data flows always starts or ends at an external agent and starts or ends at a data store. Conversely, this means that a series

of data flows can not start or end at a process.2. A process must have both data inflows and outflows.3. All data flows must be labeled with the precise data that is being exchanged.4. Process names should start with a verb and end with a noun.5. Data flows are named as descriptive nouns.6. A data store must have at least one data inflow.7. A data flow can not go between an external agent and a data store, but a process must be in between.8. A data flow can not go between to external agents, but a process must be in between.9. A data flow can not go between to data stores, but a process must be in between.10. External agents and data flows can be repeated on a process model in order to avoid lines crossing, but do not repeat processes.

Prepared by Ms Atiya

Page 2: Data Flow Diagram Tutorial

A Context Model is done first when completing the process models for a system. It represents the system with a single process and then shows the external agents with which the system interacts. A context diagram is often named the name of the system and does not start with a verb as do other processes. Typically data stores are not part of a context model since these would be internal to the system. By creating the context model first the system analyst focuses on the outward communications and exchanges and later the inward communications and exchanges.

After the context model is created the process is exploded to the next level to show the major processes in the system. Depending upon the complexity of the system each of these processes can also be exploded into their own process model. This continues until the goal of each process accomplishing a single function is reached. Because of this approach the context model is referred to as Level 0 (Zero) DFD, the next as Level 1 DFD, etc.

To better understand this technique let’s look at an example case and create a Level 0 and maybe a Level 1 process models for it.

1. In the Level 0 of the Data Flow Diagram, also called Context Diagram, the only things included are:

The process or system being analyzed and described depicted as one process. The external entities which the system/process exchanges data. The data stores with which the system/process exchanges data.

2. In general, external entities, similar to actors in Use Case diagrams, should be named using the same terms that the business or stakeholders.  Introducing new names for the same things will, in long term, only cause more confusion.  For example: If the customer interacts with the process then just call the entity "Customer" unless you have multiple types of

customers which may exchange different type of data with the process/system. If the external entity is another system then use the existing system name. Ex: "Cyberbank Loan Processing System" If the external entity is an organization then user the organization name.  Ex: "ACME Widget Maker"

3. After Level 0 you decompose the main process/system into key sub processes which becomes the Level 1 diagram.  After that each sub-process in Level 1 is further decomposed (if needed and it makes sense) into further sub-processes which now become part of the Level 2 set of diagrams.  Theoretically, you can have as many levels as you want.  The purpose of the levels is to break down a complex process/system into manageable pieces.  How many levels you are going to have and how many processes you should show at one level is somewhat arbitrary and depends on the complexity of your data flows.  Use common sense.  For example: BAD: having only Level 0 with one process and then in Level 1 having the main process decomposed into 100 sub-

processes is not a good thing. BAD: having Level 0 and then Level 1 - 20 where in each Level x diagram you only have 2 sub-processes doesn't sound

good either.

Prepared by Ms Atiya

Page 3: Data Flow Diagram Tutorial

CASE1:-

A customer goes into a bookshop and asks for this book by given a book detail. The member of staff looks for the book in the online stock catalogue and reports that the book is sold out.

Case2:Every month, the Medical Centre receives a list of current drugs available from the drug companies. These lists are collated into a catalogue of drugs which is copied and given to each doctor

CASE3

The purpose of the GREEN ACRES REAL ESTATE SYSTEM is to assist agents as they sell houses. Sellers contact the agency, and an agent is assigned to help the seller complete a LISTING REQEUEST. Information about the house and lot taken from that request is stored in a file. Personal information about the sellers is copied by the agent into a sellers file.

When a buyer contacts the agency, he or she fills out a BUYER REQUEST. Every two weeks, the agency sends prospective buyers AREA REAL ESTATE LISTINGS and an ADDRESS CROSS REFERENCE LISTING containing actual street addresses. Periodically, the agent will find a particular house that satisfies most or all of a specific buyer’s requirements, as indicated in the BUYER’S REQUISREMENTS STATEMENT distributed weekly to all agents. The agent will occasionally photocopy a picture of the house along with vital data and send the MULTIPLE LISTING STATEMENT (MLS) to the potential buyer.

When the buyer selects a house, he or she fills out an OFFER that is forwarded through the real estate agency to the seller, who responds with either an OFFER ACCEPTANCE or a COUNTEROFFER. After an offer is accepted, a PURCHASE AGREEMENT is signed by all parties. After a PURCHASE AGREEMENT is notarized, the agency sends an APPRAISAL REQUEST to an appraiser, who appraises the value of the house and lot. The agency also notifies its finance company with a FINANCING APPLICATION.

First we will do the context diagram or Level 0 DFD. Start by identifying all the external agents and the data flows from them to the system. You will then need to open Microsoft’s Visio software and select new diagram type of data flow model diagram under the software category.

Prepared by Ms Atiya

Page 4: Data Flow Diagram Tutorial

Prepared by Ms Atiya

Page 5: Data Flow Diagram Tutorial

Select the external interfaces and process and place them on your page.

To determine the data flows it may help to create an Event Response List. For our case it would look something like this.

EVENT LIST

Event DescriptionTrigger (Inputs) Responses (Outputs)

Seller enter into agreement to have agency sell house

Listing Request Create ListingCreate Seller

Buyer initiates contact with agency about buying a home.

Buyer Request Area Real Estate ListingAddress Cross ReferenceMultiple Listing StatementBuyer’s Requirement Statement

Buyer makes offer on house. Offer Offer DocumentSeller accepts buyer’s offer. Purchase Agreement Notarized Purchase

AgreementSeller makes counteroffer to seller. Counteroffer Counteroffer documentAgency sends a request to a appraiser to have house appraised.

Appraisal Request Appraisal of House report

Agency notifies financial company of opportunity to finance house.

Financing Application Financing Program Offer

These events become the data flows on the context diagram. Next you are ready to add the data flows to your diagram.

Be sure and use the connector tool as I demonstrate in class to do your data flows instead of dragging that object onto the page. If you don’t do this, you will not carry those data flows over when you explode to the next level of diagram. Your top level should look something like this:

Prepared by Ms Atiya

Page 6: Data Flow Diagram Tutorial

Prepared by Ms Atiya

Page 7: Data Flow Diagram Tutorial

Drawing Diagram 0

• The explosion of the context diagram• May include up to nine processes• Each process is numbered• Major data stores and all external entities are included• Start with the data flow from an entity on the input side• Work backwards from an output data flow• Examine the data flow to or from a data store• Analyze a well-defined process• Take note of any fuzzy areas

Draw the DFD for a distance education university. The enrolment process works as follows:Students send in an application form containing their personal details, and their desired courseThe university checks that the course is available and that the student has necessary academic qualifications.If the course is available the student is enrolled in the course, and the university confirms the enrolment by sending a confirmation letter to the student.If the course is unavailable the student is sent a rejection letter.

A student (EE) sends in an application form (DF) containing their personal details, and their desired course The university checks (P) that the course is available.

Prepared by Ms Atiya

Page 8: Data Flow Diagram Tutorial

If the course is available the student is enrolled (P) in the course, and the university confirms (P) the enrolment by sending a confirmation letter (DF) that they are registered for the course to the student.

Or if the course is unavailable the student is sent a rejection letter (DF).

To create the Level 1 DFD you must select the process and click on DFD then New Detail Page.

Prepared by Ms Atiya

Page 9: Data Flow Diagram Tutorial

This new page automatically brings forward the data flows and their connected interfaces. This helps keep track as you focus now on the internal processes of the system.

Prepared by Ms Atiya

Page 10: Data Flow Diagram Tutorial

If you have time continue and create the Level 1 DFD for the internal functioning of the Green Acres Real Estate System.

Prepared by Ms Atiya