the drawing of the flow chart Reference: http://blog.csdn.net/xianshengsun/article/details/7439537
first, the basic composition of the flow chart
Data flow: Consists of a set of fixed components of data that represent the flow of data. It is important to note that data flow is described in the streaming diagram, not the control flow. In addition to the flow of data to or from the data store does not have to be named, each data flow must have an appropriate name to reflect the meaning of the data stream.
processing: processing describes the transformation between the input data stream and the output data , that is, the input data flows through what processing becomes the output data . The function is to process the input data into the desired output data . each processing has a name and a number . The number can reflect the level of the processing in the hierarchical flow chart and which diagram, can see it is by which processing decomposition of sub-processing.
data storage: data storage represents data that is temporarily stored . Each data store has a name.
external entity: An external entity refers to a person or organization outside the system that points to the origin of the data or the data that the system produces.
External solid processing data storage
Second, the design method of layered streaming chart First step: Draw the subsystem's input and output
Draw the top level diagram: The entire system is considered a large processing, and then according to the data system from which external entities receive the data stream , and the system sends the data flow to those external entities , you can draw the input and output diagram.
Step Two: Draw the inside of the subsystem
Draw 0 Layer diagram: The processing of the top layer diagram into a number of processing, and the data flow to connect these processing , so that the input data of the top-level graph after a number of processing, into the top-level graph output data stream.
decomposition of processing: The process of drawing a flow chart from a processing is the decomposition of processing.
1) Determine the processing method:
1. The composition of the data stream or the value of the change in the local decision processing.
2. According to the function of the system to determine processing.
2) method for determining the data flow:
arriving together, the data processed together can be viewed as data streams.
3) about data storage:
For future data to be used , it can be organized into a data store to represent.
The third step, the interior of the painting process
1) treat each process as a small system;
2) The input and output data stream of the processing is regarded as the input and output stream of the small system.
3) Draw a graph of the processing of each small system like a 0-layer picture.
The fourth step, the decomposition diagram of the sub-processing
For each process in the DFD diagram that is decomposed in the third step, the decomposition process of the third step is repeated until the decomposition of the process in the diagram is not decomposed. At this point, a set of hierarchical streaming diagrams has been obtained.
Fifth step, the flow chart and processing number
For a software system, its streaming diagram may have many layers, and each layer has a lot of pictures. To differentiate between different processes and different DFD sub-graphs, each graph should be numbered for easy management.
The top-level chart has only one sheet, and there is only one processing in the figure, so you don't have to number it.
The 0-layer chart has only one sheet, the processing numbers are 0.1, 0.2 、..., or 1, 2, respectively.
A sub-graph is a processing number that is decomposed in the parent image.
The processing number in the sub-chart is composed of a figure number, a dot, and a sequence number, such as 1.12,1.3 and so on.
Issues to be aware of:
1. Names should be appropriate for data flow, processing, data storage, and external entities, and the name should reflect the actual meaning of the ingredient and avoid the use of empty names.
2. Draw a streaming chart, not draw control flow.
3. A processed output data stream should not have the same name as the input data stream, and their composition is exactly the same in time.
4. Allows one processing to have multiple streams of data flowing to another processing, and also allows one process to have two identical output streams flowing to different processes.
5. Maintain the balance between the parent and the sub-graphs. In other words, the input and output stream of a processing in the parent graph must be the same as the number and name of the input and output stream of his sub-graph. It is worth noting that if one of the input (output) streams in the parent map corresponds to several input (output) streams in the sub-graph, and the whole of the data items that make up the data streams in the sub-graph are exactly the data flow in the parent graph, they still count is balanced.
6. In the top-down decomposition process, if a data store first appears, and only one processing has a relationship, then this data storage should be used as the internal file of the processing without drawing.
7. Maintain data conservation, that is, the data in all the output streams of a processing must be able to be obtained directly from the output stream of the processing, or through the processing can produce data.
8. Each processing must have both an input data stream and an output data stream.
9. In the entire data flow diagram, each datastore must have both a read and a written stream of data. But in one of the sub-graphs, it is possible that only the read is not written, or only the write is not read.
Pay special attention to the above points, are the objectives of the exam. The contents of the exams in the last two years are concentrated on the 2, 5, 6, 8 points.
Iii. examples
Data flow Diagram (DFD): streaming diagram, or DFD, is a tool used in the SA method to represent the logical model of a system, which graphically depicts the process in which it flows and processes the system, and because it reflects only the logical functions that the system must complete, it is a functional model.
is a plane ticket reservation system Data flow chart, it reflects the function is: the travel agent to book The Passenger information (name, age, unit, identity card number, travel time, destination, etc.) into the ticket reservation system. 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. 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.
Figure 3-6 shows a DFD equivalent to figure 3-2, drawn using this set of symbols.
3.3.3 Example of a flowchart
The drawing of the flow chart