The drawing of the flow chart (turn)
Streaming Diagram (DFD)
The data flow diagram, or DFD, is a tool used in the SA method to represent the logical model of the system, which graphically depicts the process of flowing and processing in the system, because it only reflects the logic functions that the system must complete, so it is a functional model.
The figure below is a data flow chart for an airplane ticket reservation system, which reflects the function that the travel agent enters the ticket reservation system by entering the passenger information (name, age, unit, ID number, travel time, destination, etc.) of the booked ticket. The system arranges flights for passengers and prints out ticket receipt (with accounts payable). Passengers on the day before the departure of the aircraft with the receipt of tickets to collect tickets, the system inspection is correct, the output of air tickets to passengers.
3.3.1 Basic Graphic symbols
The streaming diagram has four basic graphical symbols:
: arrows, indicating data flow;
0: Round or oval, indicating processing;
=: Parallel bars, indicating data storage;
-: box that represents the source or end point of the data.
(1) Data flow. 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, ID number, date, destination 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) processing (also known as data processing). Perform certain operations or transformations on the data stream. Each process also has a name, usually a verb phrase, which concisely describes what is done. In a layered streaming diagram, processing should also be numbered.
(3) data storage (also known as a file), refers to the data temporarily saved, it can be a database file or any form of data organization.
(4) A data source point or end point is an entity (including a person, organization, or other software system) in the external environment of the software system, collectively referred to as an external entity. Usually appears only in the top-level diagram of the streaming graph.
3.3.2 Steps to draw a streaming chart
(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. The chart below is a top-level diagram 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 ticket reservation system above the 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 diagram as shown in Figure 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.
Figure 3-6 shows a DFD equivalent to figure 3-2, drawn using this set of symbols.3.3.3 Example of a flowchart