Data flow design is a way to represent the architectural design of the software. It expresses the input-process-output of the software. The designs start with creating the data flow diagram, and later we transform the diagram into a structure chart.
The data flow diagram represents the data flow and data transformation within the software. However, the structure chart represents the components and the relationship between these components.
In the section ahead, we will discuss the data flow design in detail with the help of an example. And we will discuss why we require the data flow design.
Content: Data Flow Design in Software Engineering
- What is Data Flow Design?
- Why do we Require it?
- How to Create DFD with Example?
- How to Create Structure Chart?
What is Data Flow Design?
It is a method of representing the architectural design of the software. The method identifies the flow of data within the intended software. The design starts with the software specification and moves toward the large-scale structure for software.
Thus, the design enables a semantic bridge between the user and the software developers. The large-scale structure of the software includes:
- Relations between these components
Components of the software are a set of code lines that include data and the functions to perform on the data. Each component is self-contained and is all the way separate from the other component. A software component calls another component of the software, and it further calls some other component.
The design is created in two stages:
- Stage 1
The data flow and data transformation within the software are analyzed at the initial stage by creating the data flow diagram.
- Stage 2
Transform the data flow diagram into the structure chart. The structure chart represents the components of the software and the interrelationship between these components.
Why do we Require it?
There are two main reasons behind using the data flow design:
- The design provides the connection between data flows and modularity.
- Because of the idea of idealized software.
A data flow diagram aims to create a design with the best possible modularity. Modularity means that the individual components can be designed, tested, understood and changed without affecting the other component of the software. The independent component is the component that communicates with the other component only by inputting and outputting serial streams of data. We refer to this kind of interaction as data coupling.
Our second concern is an idealized structure of the software. Many software has a similar overall structure. The software mostly takes the input, performs some action on the input data, and outputs the resultant data. The important among these three is the action performed on the software. So, it must be at the top level of the idealized structure.
How to Create Data Flow Diagram with Example?
Consider a case, a chef works in a kitchen and prepares plates of spaghetti bolognese. Now, what must be the input for this dish?
And what will the output:
- A plate of spaghetti bolognese
A concise design to represent the above input and output is as follows:
The design above represents how the data flow into the system, how it is transformed by the actions (functions) and how the data flows out of the system.
The three lines with an arrow represent the data flow through the system in the design above. The bubble represents the process that transforms the input data into output data.
As the design is concise, only one bubble (prepare food) represents the transformation. Let us explore the details within this single bubble. So, we need to redraw the data flow design more precisely to show the data flow steps more clearly.
We have elaborated the design with the essential components – data flow (lines) and functions (bubbles).
The line is labelled with the data that flows through the system. The bubble is labelled with the verb that transforms the input data to output data.
We can create the data flow design, adding more and more details to it. We can always start with a high-level design and end up by creating a design with more details. The design reveals the software components are clearly.
However, there are there approaches for creating the data flow design:
You can start with the single large bubble that denotes the basic operation of the software. Further, you can break this bubble into smaller bubbles that would detail the components involved in the software.
You can also start with the output data stream that denotes the software’s output. Further, you have to trace the output stream backwards to create the design.
You can even start with the input data stream and trace this stream in the forward direction to create the data flow design.
How to Create Structure Chart?
Now we will learn to transform the data flow diagram into a structure chart. A structure chart represents all the software components and how these components call each other when the software performs i.e. the relation between them.
The steps to transform the data flow diagram into the design are as follows:
- Initially, identify the most important bubble in the data flow diagram.
- Convert the identified bubble as the top-level component of the structure chart.
- Convert the remaining bubbles into other components of the software. These components will dangle under the top-level component of the software. The structure will appear like a hierarchical tree.
- Now convert the bubbles into rectangles representing the components and the data flow lines into the lines representing the method call.
If we convert the data flow diagram of the example above into the structure chart, it would appear as:
The structure chart represents the software in terms of well-defined, independent components if you observe carefully. Still, the created design does not provide the detail of every component. So, there is still the scope of carrying out the low-level detailing.
Thus, we can say that the data flow design provides the high-level architectural design of the software.