Скачать презентацию ACG 6415 Data Modeling Data Flow Diagrams Flow Скачать презентацию ACG 6415 Data Modeling Data Flow Diagrams Flow

cf0c3012946b9c83f11420a9a6ab8c93.ppt

  • Количество слайдов: 59

ACG 6415 Data Modeling: Data Flow Diagrams Flow Charts ACG 6415 Data Modeling: Data Flow Diagrams Flow Charts

Logical DFD ¡ A logical data flow diagram is a graphical representation of a Logical DFD ¡ A logical data flow diagram is a graphical representation of a system showing the system’s processes (as bubbles), data stores, and the flows of data into and out of the processes and data stores. l l WHAT tasks the system is doing— without having to specify how, where, or by whom the tasks are accomplished. The advantage of a logical DFD (versus a physical DFD) is that we can concentrate on the functions that a system performs. 2

Data Flow Diagrams ¡ Logical model of ? l Data gathered from requirements determination Data Flow Diagrams ¡ Logical model of ? l Data gathered from requirements determination ¡ RD determined what? l l ¡ What the new system should do AND What the old system does Depiction of processes and data flows of a system 3

Data Flow Diagrams Modeling tool ¡ Graphically represent a system as ¡ l l Data Flow Diagrams Modeling tool ¡ Graphically represent a system as ¡ l l ¡ network of functional processes connected to one another by “pipelines” and “holding tanks” of data. The components of a typical dataflow diagram: the process, the flow, the store, and the terminator/Entity. 4

Basic DFD Symbols 5 Basic DFD Symbols 5

Level-1 DFD Employee Record S 1 Employee Data File Hours Worked 1. 0 Time Level-1 DFD Employee Record S 1 Employee Data File Hours Worked 1. 0 Time Sheet 2. 1 Compute Gross Pay S 2 Payroll Data File 2. 2 Gross Pay Compute Data Net Pay Data Create Weekly Payroll Record Create Payroll Check Payroll Record 3. 1 Sort Payroll Records by Employee Sorted Records 3. 2 Employee Paycheck 4. 2 Employee Tax Form 2. 3 4. 1 Print Weekly Payroll Summary Print Calculate Employee Payroll Report Payroll Tax Deductions Record Deductions Form Accounting Department 6

Benefits of DFD’s ¡ ¡ ¡ Uncover misunderstandings of system processes Help communicate analyst Benefits of DFD’s ¡ ¡ ¡ Uncover misunderstandings of system processes Help communicate analyst system understanding to management/end users Helps to take the system out of context l Eases the problem of thinking outside of the box 7

The Process ¡ ¡ Process the process name will describe what the process does. The Process ¡ ¡ Process the process name will describe what the process does. Use Verb-Object Phrase That is, the process sometimes describes who or what is carrying out the process, rather than describing what the process is. In 6415 l we will only describe what the process does logical vs. physical DFD 8

The Flow ¡ A flow is represented graphically by an arrow into or out The Flow ¡ A flow is represented graphically by an arrow into or out of a process l ¡ ¡ we wont use double sided arrows in class used to describe the movement of chunks, or packets of information from one part of the system to another part. Thus, the flows represent data in motion For many complex, real-world systems, the DFD will show the flow of materials and data. The name represents the meaning of the packet that moves along the flow. A corollary of this is that the flow carries only one type of packet, as indicated by the flow name. Note also that the flows show direction: l indicates whether data (or material) are moving into or out of a process 9

Diverging and Converging Flows ¡ Diverging flow: l l ¡ duplicate copies of a Diverging and Converging Flows ¡ Diverging flow: l l ¡ duplicate copies of a packet of data are being sent to different parts of the system or that a complex packet of data is being split into several more elementary data packets, each of which is being sent to different parts of the system Converging flow: l several elementary packets of data are joining together to form more complex, aggregate packets of data. 10

Diverging Data Flow 11 Diverging Data Flow 11

The Store ¡ The store is used to model a collection of data packets The Store ¡ The store is used to model a collection of data packets at rest. l a store can be data stored on: ¡ ¡ ¡ punched cards, microfilm, microfiche, or optical disk, or a variety of other electronic forms, a 3 -by 5 index cards in a card box, or names and addresses in an address book, or several file folders in a file cabinet, or a variety of other noncomputerized forms. The notation for a store is two parallel lines Typically, the name chosen to identify the store is the plural of the name of the packets that are carried by flows into and out of the store. 12

Entity The Terminator or External Entity ¡ ¡ Terminators represent external entities with which Entity The Terminator or External Entity ¡ ¡ Terminators represent external entities with which the system communicates. graphically represented as a rectangle l They are outside the system we are modeling; the flows connecting the terminators to various processes (or stores) in our system represent the interface between our system and the outside world. ¡ ¡ l l These are Inputs and Outputs to/from the System Entities providing Inputs are AKA Sources Entities receiving Outputs are AKA Sinks Entities can be both Sources and Sinks Any relationship that exists between terminators will not be shown in the DFD model. If there are relationships between the terminators, and if it is essential for these to be modeled then ¡ the terminators are actually part of the system and should be modeled as processes. 13

DFD Guidelines 1. 2. 3. 4. 5. Choose meaningful names for processes, flows, stores, DFD Guidelines 1. 2. 3. 4. 5. Choose meaningful names for processes, flows, stores, and terminators. Number the processes. Redraw the DFD as many times as necessary for esthetics. Avoid overly complex DFDs. Make sure the DFD is internally consistent and consistent with any associated DFDs (ie Balanced). 14

DFD Levels ¡ ¡ DFD models are organized in a series of levels so DFD Levels ¡ ¡ DFD models are organized in a series of levels so that each level provides successively more detail about a portion of the level above Top Level: Context Diagram l l ¡ consists of only one bubble representing the entire system the data flows show the interfaces between the system and the external entities Successive Levels: l Figure/Level-0 ¡ ¡ l l l highest-level view of the major functions within the system the major interfaces between those functions Level-1. . . Level n 15

How Many Levels should you have? each DFD figure should have no more than How Many Levels should you have? each DFD figure should have no more than half a dozen bubbles and related stores. ¡ Simple Systems ¡ l ¡ Medium Sized System l ¡ 2 -3 Levels 3 -6 Levels Large System l 5 -8 Levels 16

Balancing DFD Levels ¡ To ensure that each figure is consistent with its higher-level Balancing DFD Levels ¡ To ensure that each figure is consistent with its higher-level figure, we follow a simple rule: l the data flows coming into and going out of a bubble at one level must correspond to the data flows coming into and going out of an entire figure at the next lower level which describes that bubble. 17

How do you show stores at the various levels? show a store at the How do you show stores at the various levels? show a store at the highest level where it first serves as an interface between two or more bubbles ¡ then show it again in EVERY lowerlevel diagram that further describes (or partitions) those interface ¡ 18

Context Diagram ¡ One Process l ¡ At least one Entity l ¡ Describes Context Diagram ¡ One Process l ¡ At least one Entity l ¡ Describes System / Process Outside of System / Process At least one Source & one Sink 19

Logical DFD 20 Logical DFD 20

Context-Level Diagram Employee Tax Form Employee 0 Time Sheet Payroll Report Employee Payroll System Context-Level Diagram Employee Tax Form Employee 0 Time Sheet Payroll Report Employee Payroll System Employee Payroll Check Accountin g Departme nt 21

Level-0 DFD 2. 0 Employee Record Employee S 1 Employee Data File Compute Weekly Level-0 DFD 2. 0 Employee Record Employee S 1 Employee Data File Compute Weekly Paycheck Data S 2 Payroll Record Hours Worked 3. 0 1. 0 Time Sheet Create Weekly Payroll Record Employee Paycheck 4. 0 Employee Tax Form Payroll Data File Prepare Employee Tax Form Prepare Weekly Payroll Summary Payroll Report Accounting Department 22

Level-1 DFD Employee Record S 1 Employee Data File Hours Worked 1. 0 Time Level-1 DFD Employee Record S 1 Employee Data File Hours Worked 1. 0 Time Sheet 2. 1 Compute Gross Pay S 2 Payroll Data File 2. 2 Gross Pay Compute Data Net Pay Data Create Weekly Payroll Record Create Payroll Check Payroll Record 3. 1 Sort Payroll Records by Employee Sorted Records 3. 2 Employee Paycheck 4. 2 Employee Tax Form 2. 3 4. 1 Print Weekly Payroll Summary Print Calculate Employee Payroll Report Payroll Tax Deductions Record Deductions Form Accounting Department 23

Functional Primitive 4. 1. 1 Calculate Payroll Tax Deductions Employee Tax Form Employee Payroll Functional Primitive 4. 1. 1 Calculate Payroll Tax Deductions Employee Tax Form Employee Payroll Record Employee Data 4. 2. 2 Print Employee Tax Form 4. 2. 1 Employee Data Calculate Employee Vacation Pay 4. 1. 3 Employee Data 4. 1. 2 Employee Data Calculate Retirement Allowance Calculate Non-tax Deductions 24

Balanced DFDs The next slide depicts “balanced” data flow diagrams. ¡ Balanced DFDs exist Balanced DFDs The next slide depicts “balanced” data flow diagrams. ¡ Balanced DFDs exist when the external data flows are equivalent. ¡ DFD (a) is a context diagram and (b) is an “explosion” of it into a level 0 logical DFD. ¡ DFD (c), (d) and (e) are “explosions” of the logical level 0 DFD, and so on. ¡ 25

Balanced DFDs 26 Balanced DFDs 26

The Rules of DFDs In a nutshell… All data flows must begin and/or end The Rules of DFDs In a nutshell… All data flows must begin and/or end at a process, because data flows either initiate or result from a process. 27

Rules Governing DFD Construction ¡ A process cannot have only outputs – “miracle. ” Rules Governing DFD Construction ¡ A process cannot have only outputs – “miracle. ” ¡ A process cannot have only inputs – “black hole. ” ¡ The inputs to a process must be sufficient to produce the outputs from the process (gray hole). ¡ All data stores must be connected to at 28 least one process.

Rules Governing DFD Construction ¡ ¡ ¡ A data store cannot be connected to Rules Governing DFD Construction ¡ ¡ ¡ A data store cannot be connected to a source or sink. A data flow can have only one direction of flow. Multiple data flows to and/or from the same process and data store must be shown by separate arrows. If the exact same data flows to two separate processes, it should be represented by a forked arrow. Data cannot flow directly back into the process it has just left. 29 All data flows must be named using a noun phrase.

Three Basic Illegal Data Flows Identifier Entity Name Process Name Black Hole Identifier File Three Basic Illegal Data Flows Identifier Entity Name Process Name Black Hole Identifier File Name Process Name Miracle 1. 0 Employee File Create Employee Paychecks Employee Gray Hole 30

Other Illegal Flows Employee D 1 File D 1 Cust File D 2 Order Other Illegal Flows Employee D 1 File D 1 Cust File D 2 Order File Customer 1. 0 Create Employee Paychecks Employee Data Must Be Connected to a Process No Bi-Directional Flows 31

One Final Illegal Flow 2. 1. 0 Process Name Data Cannot Flow Directly Back One Final Illegal Flow 2. 1. 0 Process Name Data Cannot Flow Directly Back Into The Process It Left 32

A Debate Which is Right? 2. 2. 0 Process 2. 1. 0 Process 2. A Debate Which is Right? 2. 2. 0 Process 2. 1. 0 Process 2. 3. 0 Process 33

Balancing Data Flows 0 Source A A B Context Level System 0 Sink B Balancing Data Flows 0 Source A A B Context Level System 0 Sink B Context Formatted A Sink Level System 1. 0 A Source 2 C 2. 0 Format Data B Formatted C C Source 2 Send Reports Sink 34

Preparing Data Flow Diagrams Read narrative carefully - number lines and paragraphs in text Preparing Data Flow Diagrams Read narrative carefully - number lines and paragraphs in text ¡ Prepare table of entities and activities ¡ Draw context diagram - use DFD guidelines ¡ 35

Steps for Creating E&A Table 1. 2. 3. 4. 5. 6. Read Narrative Identify Steps for Creating E&A Table 1. 2. 3. 4. 5. 6. Read Narrative Identify all Verb phrases (circle them) Identify all Noun phrases (rectangles or data store) Line by line insert noun as Entity and Verb as Activity along with data flow noun if present Identify External Entities Identify Internal Entities 36

DFD Guidelines 1. Include on the systems documentation all (and only) activities and entities DFD Guidelines 1. Include on the systems documentation all (and only) activities and entities described in the systems narrative - no more, no less. ¡ 2. When multiple entities operate identically, depict only one to represent all. ¡ 37

Causeway Context Diagram 38 Causeway Context Diagram 38

DFD Guidelines (cont. ) ¡ ¡ 3. For clarity, draw a data flow for DFD Guidelines (cont. ) ¡ ¡ 3. For clarity, draw a data flow for each flow into and out of a data store. You may, also for clarity to help you determine that you have included all necessary flows, label each flow with the activity number that gives rise to the flow or with a description of the flow. 4. If a data store is logically necessary (that is, because of a delay between processes), include a data store in the diagrams, whether or not it is mentioned in the narrative. 39

DFD Guidelines (Level-0 and higher) ¡ ¡ ¡ 5. Group activities if they occur DFD Guidelines (Level-0 and higher) ¡ ¡ ¡ 5. Group activities if they occur in the same place and at the same time. 6. Group activities if they occur at the same time but in different places. 7. Group activities that seem to be logically related. 8. To make the DFD readable, use between five and seven bubbles. 9. On a logical DFD, data flows cannot go from higher- to lower-numbered bubbles. 40

Causeway Logical Level 0 DFD 41 Causeway Logical Level 0 DFD 41

Standard Flowchart Symbols 42 Standard Flowchart Symbols 42

Common system flowcharting routines ¡ The following slides show several common ways of showing Common system flowcharting routines ¡ The following slides show several common ways of showing processing using system flowcharting. ¡ Pay particular attention to the way the columns are set up to communicate the flow of activities between processing entities. 43

The data-entry clerk keys in an input document into the computer. The computer accesses The data-entry clerk keys in an input document into the computer. The computer accesses data in a data store 1 and in data store 2 to edit/validate the input. The computer displays the input, including any errors. The clerk compares the input document to the display, keys corrections as necessary, and accepts the input. The computer updates the table in data store 2 and notifies the clerk that the input has been recorded. 44

User queries the computer. The computer accesses the table(s) in one of more data User queries the computer. The computer accesses the table(s) in one of more data stores & presents a response to the user. Update sequential data store from magnetic disk are input to the computer, along with the existing (old) master data – becoming the new master data 45

The user batches the input documents, prepares batch totals, and keys the documents into The user batches the input documents, prepares batch totals, and keys the documents into the computer. The computer records the inputs on disk and notifies the user as each input is accepted. The user files the input documents in numerical sequence. At the end of the batch, the computer prepares an exception & summary report that includes batch totals. The user compares the computer batch totals to those prepared earlier. 46

A data entry clerk enters documents into a networked PC system. The system records A data entry clerk enters documents into a networked PC system. The system records the inputs on a disk and notifies the user of the acceptance of each input. The documents are then forwarded to a different clerk who keys the documents again. Differences are resolved and the event data are updated to reflect the verifications and corrections. 47

A clerk scans a document into the computer. Use the data from the scanned A clerk scans a document into the computer. Use the data from the scanned document, the computer updates the data store(s) 48

A clerk scans a document into the computer. The computer routes an image of A clerk scans a document into the computer. The computer routes an image of the scanned input to a data entry clerk, who keys data from the documents image into the computer. The computer records the data with the scanned document 49

Preparing Systems Flowcharts ¡ ¡ 1. Divide the flowchart into columns; one column for Preparing Systems Flowcharts ¡ ¡ 1. Divide the flowchart into columns; one column for each internal entity and one for each external entity. Label each column. 2. Flowchart columns should be laid out so that the flowchart activities flow from left to right, but you should locate columns so as to minimize crossed lines and connectors. 50

System flowcharting guidelines (cont. ) ¡ ¡ 3. Flowchart logic should flow from top System flowcharting guidelines (cont. ) ¡ ¡ 3. Flowchart logic should flow from top to bottom and from left to right. For clarity, put arrows on all flow lines. 4. Keep the flowchart on one page. If you can’t, use multiple pages and connect the pages with off-page connectors. Computerized flowcharting packages will print your flowcharts only on paper that will fit in your printer! 51

52 52

System flowcharting guidelines (cont. ) ¡ ¡ 5. Within each column, there must be System flowcharting guidelines (cont. ) ¡ ¡ 5. Within each column, there must be at least one manual process, keying operation, or data store between documents. That is, do not directly connect documents within the same column. 6. When crossing organizational lines (one column to another), show a document at both ends of the flow line unless the connection is so short that the intent is unambiguous. 53

System flowcharting guidelines (cont. ) ¡ ¡ 7. Documents or reports printed in a System flowcharting guidelines (cont. ) ¡ ¡ 7. Documents or reports printed in a computer facility should be shown in that facility’s column first. You can then show the document or report going to the destination unit. 8. Documents or reports printed by a centralized computer facility on equipment located in another organizational unit ( warehouse, shipping dept. ) should not be shown within the computer facility. 54

System flowcharting guidelines (cont. ) ¡ ¡ 9. Processing within an organizational unit on System flowcharting guidelines (cont. ) ¡ ¡ 9. Processing within an organizational unit on devices such as a PC or computerized cash register should be shown within the unit or as a separate column next to that unit, but not in the central computer facility column. 10. Sequential processing steps (computerized or manual) with no delay between them (and resulting from the same input) can be shown as one process or as a sequence of processes. 55

System flowcharting guidelines (cont. ) ¡ ¡ ¡ 11. The only way into a System flowcharting guidelines (cont. ) ¡ ¡ ¡ 11. The only way into a computer data storage unit is through a computer processing rectangle. 12. A manual process is not needed to show the sending of a document. The sending of the document should be apparent from the movement of the document itself. 13. Do not use a manual process to file a document. Just show the document going in to a file. 56

Causeway’s Systems Flowchart The systems flowchart for Causeway is presented again on the next Causeway’s Systems Flowchart The systems flowchart for Causeway is presented again on the next slide ¡ This flowchart for causeway is again presented without an enterprise database ¡ 57

Documenting Enterprise Systems ¡ Moving from a file-based system to an enterprise database changes Documenting Enterprise Systems ¡ Moving from a file-based system to an enterprise database changes the system flowchart l l An enterprise database replaces transaction and master data Other flows may change depending on the system implementation 58

59 59