Software Engineering-Data Flow Diagram (DFD)

Source: Internet
Author: User
Concept ---- Data Flow Diagram (DFD)

Data Flow Diagram(Date flow divisor, DFD) is a tool used in the SA method to represent the system logic model. It graphically depicts the process of data flow and processing in the system, because it only reflects the logical functions required by the system, it is a function model.

A Data Flow Diagram describes a system from the data point of view.FlowchartThe system is described from the perspective of data processing. The arrows in the data flow diagram are data streams, while the arrows in the flowchart are control flows, which express the order of program execution; the data flow chart is suitable for analyzing the business overview of an organization at a macro level, while the program flow chart is only suitable for describing the execution details of a processing in the system.

I. basic components of a data flow chart

Data Stream: It is composed of a set of fixed data, indicating the data flow. It is worth noting that the data flow diagram describes the data flow rather than the control flow. In addition to data flowing to or from data storage, you do not need to name the data flowing out. Each Data Stream must have a proper 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, after which the input data stream is converted into the output data. Each processing task has a name and a number. The number indicates the layer and graph of the data flow graph in which the processing is located, and shows which processing is used to separate the data flow graph.

Data Storage: Data Storage indicates temporarily stored data. Each data storage has a name.

External entity: An external entity is a person or organization that exists outside the software system. It indicates the source of the data required or the place where the data produced by the system is stored.

Ii. Design Method of Hierarchical Data Flow Diagram

1. input and output of the painting Subsystem

Consider the entire system as a large processing, and then draw an input and output diagram based on the external entities from which the data system receives data streams and the external entities from which the system sends data streams. This figure is called a top-level chart.

2. The interior of the painting Subsystem

The processing of top-level graphs is divided into several processes, and these processes are connected with data streams, so that the input data of the top-level graphs is converted into the output data stream of the top-level graphs after several processing processes. This graph is called a layer-0 graph. The process of drawing a data flow chart from a processing table is the decomposition of the processing.

Determine the processing method: A processing should be drawn where the composition or value of the data stream changes. The processing function is to achieve this change, and the processing can also be decided according to the system function.

Method for Determining data streams: when a user processes data as a unit (the data arrives and is processed together), the user can regard the data as a data stream.

Data storage: data that will be used at a later time can be organized into a data storage.

3. Internal painting

Consider each processing as a small system, and regard the input and output data streams processed as input and output streams of a small system. As a result, you can draw a DFD chart for each small system like a 0-layer graph.

4. Plot the decomposition chart of sub-processing

For each processing in the DFD diagram decomposed in step 3, repeat the decomposition process in step 3 until the unprocessed processing in the diagram is simple enough (that is, it cannot be decomposed again ). Now, we have a set of hierarchical data flow diagrams.

5. data flow charts and processing numbers

For a software system, the data flow diagram may have many layers, and each layer has many graphs. To differentiate different processing and different DFD subgraphs, numbers should be assigned to each graph for ease of management.

● There is only one top-level graph, and there is only one processed graph, so you do not need to enter it.

● There is only one layer-0 graph, and the processing numbers in the graph are 0.1, 0.2 ,..., Or 1 or 2.

● A subgraph is the processed number in the parent graph.

● The processing number in a subgraph is composed of the graph number, dot, and serial number, such as 1.12 and 1.3.

Iii. Notes:

1. Name. Data Stream, processing, data storage, and external entity naming should be appropriate. The name should reflect the actual meaning of the component to avoid empty names.

2,Draw a data flow chart instead of a control flow chart. The data stream reflects the system's "what" and does not reflect "How to Do". Therefore, the data stream name on the arrow can only be a noun or a noun phrase. The whole figure does not reflect the processing execution sequence.

3. Generally, no material stream is painted. Data Streams reflect data that can be processed by computers, and are not physical objects. Therefore, do not draw material streams for data flow diagrams of the target system.

4,A processed output data stream should not have the same name as the input data stream, Even if their composition is identical.

5. Allow one processing to have multiple data streams flowing to another processing, or allow one processing to have two identical output data streams flowing to different processing.

6. Id. If a data flow graph is processed into another data flow graph, the upper layer graph is the parent graph, and the lower layer graph is the subgraph. The subgraph and all the processing operations should be numbered.

7,Maintain a balance between the parent and subgraphs.. That is to say, the input and output streams processed by a parent graph must be in the same quantity and name as the input and output data streams of its subgraphs. It is worth noting that if an input (output) data stream in the parent graph corresponds to several input (output) data streams in the subgraph, the data items in the subgraphs that constitute these data streams are exactly the data streams in the parent graph, so they are still balanced.

8. In the top-down decomposition process, if a data storage is only related to one processing for the first time, this data storage should be used as an internal file for processing instead of being drawn.

9. Maintain data conservation, that is, the data in all output data streams of a processing operation must be directly obtained from the output stream or generated through the processing.

10. Each processing must have both input and output data streams.

11. In the entire data flow diagram, each data storage must have both read and write data streams. However, in a subgraph, only the read and write operations are not performed, or the write operations are not performed.

12. Improve the ease of understanding of data flow charts. Note that a proper decomposition should be divided into several sub-processes with relatively independent functions, which can reduce the number of input and output data streams between processes and increase the comprehensibility of data flow graphs.

========================================================== ============================================

Basic graphical symbols
A Data Flow chart has four basic graphical symbols:
: Arrow, indicating data flow;
0: circle or elliptic, indicating processing;
=: Parallel Bars (with one opening and one closed) indicate data storage;
□: Box, indicating the source or end point of the data.
(1) data stream. Data Stream is the path where data is transmitted in the system. Therefore, data streams are composed of fixed data. For example, a ticket consists of a passenger's name, age, unit, ID card number, date, destination, and other data items. Because a data stream is a flow of data, it must have a flow direction. In addition to the data stream between the data stream and the data storage, the data stream should be named by a noun or a noun phrase.
(2) Processing (also known as data processing ). Perform operations or transformations on data streams. Each processing should also have a name, usually a verb phrase, which briefly describes what processing is completed. In the layered data flow diagram, the processing should also be numbered.
(3) Data Storage (also called a file) refers to the temporary data stored. It can be a database file or any form of data organization.
(4) data source points or endpoints are entities (including personnel, organizations or other software systems) in the external environment of the software system, collectively referred to as external entities. Generally, only the top-level diagram of the data flow diagram is displayed.
Steps for drawing a data flow chart
(1) first draw the input and output of the system, that is, draw the top-layer data flow diagram. A top-level flow chart contains only one processing method to indicate the developed system, and then considers the input data and output data streams of the system. A top-level chart is used to indicate the scope of the developed system and its data exchange relationship with the surrounding environment. The top-level diagram of the plane ticket booking system.
(2) Draw a lower-layer data flow chart inside the system. Processing that is no longer decomposed is called basic processing. Generally, the layer number starts from 0 and adopts the principle of top-down and outward-internal. When a layer-0 data flow chart is drawn, the system that breaks down the top-layer data flow chart is a number of subsystems, and the data interface and Activity Relationship between each subsystem are determined. For example, the above ticket booking system can be divided into two parts by function. One part is the travel agency booking ticket, the other part is the passengers getting the ticket, and the two parts are linked through the data storage of the ticket file, layer-0 Data Flow Diagram 3-4.
(3) considerations.
① Name. Appropriate names make it easy for people to understand the meaning of data streams, data storage, and processing.
② Draw data streams rather than control flows. The data stream reflects what the system does, but does not reflect how it is done. Therefore, the data stream name on the arrow can only be a noun or a noun phrase. The whole figure does not reflect the processing execution sequence.
③ Do not draw material streams. Data Streams reflect data that can be processed by computers, and are not physical objects. Therefore, do not draw material streams for data flow diagrams of the target system.
④ Each processing has at least one input data stream and one output data stream, reflecting the source and processing result of the processed data.
⑤ Number. If a data flow graph is processed into another data flow graph, the upper layer graph is the parent graph, and the lower layer graph is the subgraph. The subgraph and all the processing operations should be numbered.
⑥ Balance between parent and subgraphs. The input and output data streams of subgraphs must be consistent with the input and output data streams processed by the parent graph. This means that the parent graph is balanced with the subgraphs.
7. Local Data Storage. When data storage in a data flow graph at a layer is not an external interface processed in the parent graph, but a data interface between some processes in the diagram, the data storage is called a local data storage.
Improve data flow diagrams. Note that a proper decomposition should be divided into several sub-processes with relatively independent functions, which can reduce the number of input and output data streams between processes and increase the comprehensibility of data flow graphs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.