Data Flow Diagram: A DFD, which graphically expresses the logical function of the system, the logical flow of data within the system, and the logical transformation process from the point of view of transmission and processing. Is the main expression tool of structured system analysis method and a graphic method used to represent software model.
1 , DFD
The data flow diagram is a tool used in structured analysis, which graphically depicts the process of the movement and processing in the system, because it only reflects the logic function that the system must complete, so it is a functional model. In the structured development method, the data flow diagram is the result of the requirement analysis stage. It is a transformation that depicts the flow of information and the process of data moving from input to output.
The data flow diagram depicts the moving transformation process of data stream from input to output in a graphic way from the angle of transmitting and processing.
Data flow diagrams include:
A A data symbol indicating the existence of the data, which can also indicate the media used by the data;
b Indicates the processing symbols for the processing of data execution, which can also indicate the machine functions used in the processing;
C Indicates a number of streamline symbols for processing and/or data flow between data media;
D Special symbols for easy-to-read and write data flow diagrams.
Both before and after the processing of symbols should be data symbols. Data Flow Chart begins and ends with a data symbol (except 9. 4 special symbols specified).
There are two typical structure of the flow chart, one is the transformation structure , the work described can be expressed as input, main processing and output, linear state. The other is a transactional structure , which is a bundle of data streams that flow in or out parallel, possibly with several transaction requests.
2 , Data Flow
A data flow is a set of data. In the data flow diagram, the stream is represented by a line with arrows, and the data stream name is labeled next to its line. All possible data flows should be depicted in a data flow diagram, rather than depicting the conditions in which a particular traffic is occurring.
Processing (processing): In the flow chart processing with a circle, in the circle to write the processing name. A processing box can represent a sequence of programs, a single program, or a module of a program.
3 , constituent elements
There are several main elements in the streaming diagram:
(1) →: data stream. A data stream is a path of data propagation within a system, and therefore consists of data fixed by a set of components. If the booking is made by the passenger name, age, unit and other data items . Since the data flow is a flow of data, there must be a flow, in addition to the data stored between the data flow is not named, the data stream should be named with a noun or noun phrase.
(2)-: Data source (end point). Represents an entity outside the system, which can be a person, thing, or other software system.
(3) 0: Processing of data (processing). Processing is a unit of data processing, which receives certain data input, processes it, and produces output.
(4): Data storage. Represents the static storage of information, which can represent a file, a part of a file, an element of a database, and so on.
4 , layered DFD
The hierarchical streaming diagram is divided into top-level streaming diagrams, Middle -tier streaming diagrams and underlying streaming diagrams. In addition to the top-level streaming diagram, other streaming diagrams are numbered starting with 0 .
(1) The top-level Data flow diagram contains only one processing to represent the entire system, and the output and input data streams are the input and output data of the system, indicating the scope of the system and the data exchange relationship with the external environment.
(2) The middle-level streaming chart is the parent layer of a processing in a process to refine, and one of its processing can be refined again, the formation of sub-map, the number of intermediate levels, generally depending on the complexity of the system.
(3) The underlying streaming diagram refers to its processing can no longer decompose the flow chart, its processing is called "Atomic processing."
5 , Principles
In a single-sheet streaming diagram, the following principles must be observed:
(1) a processed output stream should not have the same name as the input data stream, even if they are of the same composition.
(2) Maintain data conservation. In other words, the data in a processing all output data stream must be able to be obtained directly from the input data stream of the processing, or the data generated by the processing.
(3) Each processing must have both the input data stream and the output data stream.
(4) All data streams must start with an external entity and end with an external entity.
(5) There should be no data flow between external entities, because one of the starting and ending points of the data flow must be processing (processing).
6 , DFD descriptive
(1) Determine the input and output of the system
As the system includes what functions may be difficult to figure out, can make the scope as large as possible, to include all possible content. At this point, the user should be informed about "what data the system receives from the outside world", "what data the system sends out to the outside world" and so on, and then, according to the user's response to draw the peripheral flow chart.
(2) Top-level streaming diagram from the outward-drawing system
First, the input data and output data of the system are connected with a series of processing. Where the value of the data stream changes, it is a process. Next, give each processing a name. Then, name the data between the processes. Finally, give the file a name.
(3) decomposition from top to bottom, draw a layered streaming chart
For large-scale systems, in order to control the complexity, easy to understand, it is necessary to use a top-down decomposition method, that is, a hierarchical approach to the decomposition of a dataflow diagram into several flow diagrams to represent each.
7 , illustrative examples
(1) First draw the system input and output, that is, first draw the top-level streaming chart. The top laminar flow diagram contains only one machining, which represents the system being developed, and then considers what input data and output data streams the system has. The role of the top-level diagram is to indicate the scope of the system being developed and the data exchange relationship between it and the surrounding environment. A top-level map of the airplane ticket reservation system.
(2) Painting system inside, that is, drawing the underlying streaming chart. Machining that is no longer decomposed is called basic machining. The number of layers is generally numbered from 0, using top-down, from the outside of the principle. When drawing the 0-layer Data flow chart, the system of decomposing top-laminar graph is a subsystem, which decides the interface and activity relationship between each subsystem. For example, in the above ticket booking system by function can be divided into two parts, part of the travel agency booking tickets, the other part for the passenger to collect tickets, two parts through the ticket file data storage links, 0 Layer flow chart 3-4.
(3) Precautions.
① named. Whether data flow, data storage or processing, proper naming makes it easy to understand what it means.
② draws the data stream instead of the control flow. The data flow reflects what the system "does" and does not reflect "how to do", so the data flow name on the arrows can only be nouns or noun phrases, and the entire graph does not reflect the order of execution of the processing.
③ generally do not draw material flow. Data flow reflects the data that can be processed by computer, it is not physical, so the flow chart of the target system is generally not to draw material stream.
④ has at least one input data stream and one output stream per processing, reflecting the source and processing results of this processing data.
⑤ number. If one of the processes in the flow chart is decomposed into another one, the upper image is the parent graph, and the lower image is the sub-graph. The sub-graph and all its machining should be numbered.
⑥ the balance of the parent and child graphs. The input and output data stream of the sub-graph the input/output data stream for the corresponding processing must be consistent, which is the balance between the parent and the sub-graph.
⑦ Local data storage. When the data storage in a layer of streaming diagram is not the external interface of the corresponding processing in the parent graph, but only the data interface between some machining in this figure, it is said that the data is stored as local data storage.
⑧ improve the ease of understanding of the flow chart. Attention to reasonable decomposition, to a processing decomposition into several functions of the relatively independent sub-processing, which can reduce the number of input and output data flow between processing, increase the understanding of the streaming diagram.
UML Flow Diagram (DFD)