Developing DFD Model of System
Last Updated :
24 Mar, 2025
Data Flow Diagram (DFD) of a system represents how input data is converted to output data graphically. Level 0, also called context level, represents the most fundamental and abstract view of the system. Subsequent lower levels can be decomposed from it. The DFD model of a system contains multiple DFDs, but there is a single data dictionary for the entire DFD model. The data dictionary comprises definitions of the data items used in the DFD.
Context diagram
A context diagram demonstrates the entire data flow of a system in a single process/bubble. The bubble is annotated with a noun representing the whole system. This is the only bubble in the DFD where a noun (in the form of the name of a system) is used. It is named "context diagram" since the purpose of the diagram is to capture the context of the system and not its functionality. All other bubbles have a verb according to the main function performed by it.
A context diagram shows three main things: users, data flow to the system, and data flow from the system. It captures various external entities interacting with the system, along with data flowing to and from the system as incoming and outgoing arrows. The context diagram requires an analysis of the SRS (Software Requirement Specification) document. Data flow is represented with data names on top of the arrows.
Construction of Level 1 and other lower level diagrams
A Level 1 DFD contains 3 to 7 bubbles representing functions. These processes can be broken down into sub-processes, each represented by a bubble. Every bubble has a verb demonstrating the functionality of that process. To create Level 1/Level 2 or other level DFDs, a bubble is broken into sub-parts containing 3-7 functionalities.
If there are more than 7 sub-processes, some related information can be combined. If there are fewer than 3 sub-processes, it can be further decomposed to create more bubbles.
1. Decomposition
Bubbles are decomposed into sub functions at successive levels of DFD level. Decomposition is called exploding/factoring a bubble. Each bubble at any level can be broken to anything between 3 and 7 bubbles. But a bubble should not be decomposed further once it is found to represent simple set of instructions. Too many bubbles at any level makes dfd hard to understand. Very less bubble makes decomposition redundant and trivial.
2. Numbering
Each process symbol must utilize a unique reference number to differentiate from one other. When a bubble x is decomposed, its children are numbered as x.1, x.2 and so on. It can help determine its ancestors, successors, and precisely its level. For example level 0 DFD is numbered as 0. Level 1 are numbered as 0.1, 0.2, 0.3 or 1, 2, 3 and so on. Level 2 are marked as 1.1, 1.2, 1.3 etc.
3. Balancing DFD
Parent DFD having inflow and out flow of data should match data flow at next child level. This is known as balancing a DFD. Concept is illustrated in figure :
Level 1 DFD
Level 2 DFD decomposing P2In Level 1 DFD, data items D1 flow out of bubble 2 and item D2 flows into bubble 2. In next level, bubble 2 is decomposed into three sub process(2.1, 2.2, 2.3). It has data item D1 flowing out and D2 flowing in. So DFD is balanced here. A bubble representing a process should have minimum one input and one output flow. When a bubble has input flow without any output flow, it is known as “black hole”. When a process has output flows but no input flows, it is called a “miracle”. A processing step may have outputs that are greater than sum of its inputs is called Grey holes.
Common mistakes to avoid while constructing DFDs
- DFDs should always represent data flow and there should be no control flow.
- All external entities should be represented at context level.
- All functionality of system must be captured in dfd and none should be overlooked. Also, only those functions specified in SRS should be represented.
- Arrows connecting to data store need not be annotated with any data name.
Data Store arrow has no annotation- DFDs should always be balanced at all levels. Dataflow in and out of parent process must be present in child diagram.
Unbalanced DFD (No receipt generation in child)- Context level bubble always contains name of entire system in form of noun and no verb can be used in its representation. Whereas all other levels only have verb in bubble representation.
Context Level having Noun as system name- There should not be any database in level 0. Level 0 contains only one bubble and external entities.
Incorrect Level 0 with datastore- No cluttering should be depicted in DFD. When too many data flowing occurs in and out of DFD, combine these data item into high level item.
DFD with cluttering- All bubbles having unique process in DFDs should be connected to another process or to a data store. It cannot exist by itself, unconnected to rest of system.