How to draw a set of DFDs
Some texts assume the Context Diagram is the Level 0 diagram, so the next level is Level 1. Other texts call next level Level 0. The important thing to understand is that there are levels and each level has more detail than the previous level.
In these instructions the levels are called
• Context diagram (less detailed)
• Level 0 DFD
• Level 1 DFDs
• Level 2 DFDs (most detailed)
Some systems may require Level 3 DFDs.
Terminology
You will need to know the following terms
• External entity
• Process
• Data store
• Data flow
If you need to learn these terms, look them up in a resource that is focussed on DFDs. Why? Because these terms are used in several diagramming methods and may have slightly different meanings.
How To Draw A Context Diagram
1 Draw a process in the middle of the page
2 Number the process with a zero, 0
3 Name the process with the system’s name
4 Draw the external entities around process 0
How many external entities? Depends on the system. Maybe only 2, maybe more than 20. Analyse to find out.
Don’t hesitate too long because if the system needs more (or fewer), the DFD diagramming method will show you as you proceed through the levels. You can always go back and adjust your diagrams later on.
5 Name the external entities
6 Draw data flows between external entities and process 0
How many data flows? Depends on the system. Maybe only 2, maybe more than 20. Analyse to find out.
Don’t hesitate too long because if the system needs more (or fewer), the DFD diagramming method will show you as you proceed through the levels. You can always go back and adjust your diagrams later on.
7 Name the data flows
Finished!
Tip: if you are working with a team, do not spend time arguing over small details. Just move on because the DFD method will show you the right answers as you proceed through the levels.
How To Draw A Level 0 DFD
1 Copy the external entities from the context diagram and space them out widely on the page
2 Identify the main functions of the system(eg, a process to manageappointments is required; a process to manage reports is required, and so on) and make one process for each main function
How many main functions? Depends on the system. Maybe only 2, maybe more than 20. Analyse to find out.
Don’t hesitate too long because if the system needs more (or fewer), the DFD diagramming method will show you as you proceed through the levels. You can always go back and adjust your diagrams later on.
3 Draw new processes for the main functions
4 Number the new processes from 1-N
5 Name the new processes according to their function (eg manage appointments)
6 Copy the data flows from the context diagram so they connect the external entities with the new processes
8 Identify data stores for the system (eg, a data store for appointments is required)
How many data stores? Depends on the system. Maybe only 1, maybe more than 20. Analyse to find out.
Don’t hesitate too long because if the system needs more (or fewer), the DFD diagramming method will show you as you proceed through the levels. You can always go back and adjust your diagrams later on.
9 Draw the data stores near the processes
10 Number the data stores like this: D1 D2 D3 and so on
11 Name the data stores according to their purpose (eg Appointments)
12 Identify data flows into and out of the data stores
How many data flows? Depends on the system. Maybe only 2, maybe more than 20. Analyse to find out.
Don’t hesitate too long because if the system needs more (or fewer), the DFD diagramming method will show you as you proceed through the levels. You can always go back and adjust your diagrams later on.
13 Check the new DFD is balanced with the parent DFD
DFDs are balanced if the parent’s data flows are in the child, and the data flows to and from external entities are the same on both DFDs. In other words, the child can have data flows of its own, if these new `data flows are not attached to external entities.
If you have added a new data flow to a child DFD and it makes the DFDs unbalanced, backtrack to the parent diagram and add it in.
In this instance, the parent is the context diagram and the child is the Level 0 DFD.
Finished!
Tip: you may have to move the processes and data stores around to make sure the data flows do not cross over.
How To Draw Level 1 DFDs
These steps are repeated for every process in the Level 0 DFD, unless a Level 0 DFD process cannot logically be broken up into sub-processes, in which case it does not require a Level 1 DFD.
1 Choose one of the processes from the Level 0 DFD
2 Note the external entities it shares data flows with
3 Copy the process’s external entities into a new diagram
4 Identify sub-processes (egsub-processes for making new appointments, changing appointments and cancelling appointments are required) and draw them between the external entities
How many sub-processes? Depends on the system. Maybe only 2, maybe more than 20. Analyse to find out.
Don’t hesitate too long because if the system needs more (or fewer), the DFD diagramming method will show you as you proceed through the levels. You can always go back and adjust your diagrams later on.
5 Number the new sub-processes according to the parent process (eg if the parent process is number 3 and it has three sub-processes, the numbers will be 3.1, 3.2 and 3.3)
6 Name the new sub-processes according to their function (eg new appointment, change appointment, cancel appointment)
7 Look at the relevant external entities in the Level 0 DFD and copy their data flows into the Level 1 DFD, connecting them to the new sub-processes
8 Copy the names of the data flows from the Level 0 DFD
9 Copy any relevant data stores from the Level 0 DFD
10 Look at the relevant data stores in the Level 0 DFD and copy their data flows into the Level 1 DFD, connecting them to the new sub-processes
10 Do you need more data stores? Draw them on the diagram
How many data stores? Depends on the system. Maybe only 1, maybe more than 20. Analyse to find out.
Don’t hesitate too long because if the system needs more (or fewer), the DFD diagramming method will show you as you proceed through the levels. You can always go back and adjust your diagrams later on.
10 Number the data stores like this: D4 D5 D6 and so on
11 Name the data stores according to their purpose
12 Identify data flows into and out of the data stores
13 Name the data flows
14 Check the Level 1 DFD is balanced with the Level 0 DFD
DFDs are balanced if the parent’s data flows are in the child, and the data flows to and from external entities are the same on both DFDs. In other words, the child can have data flows of its own, if these new data flows are not attached to external entities.
If you have added a new data flow to a child DFD and it makes the DFDs unbalanced, backtrack to the parent diagram and add it in.
In this instance, the parent is the Level 0 DFD and the child is the Level 1 DFD.
15 Check the Level 0 DFD is balanced with the context diagram
DFDs are balanced if the parent’s data flows are in the child, and the data flows to and from external entities are the same on both DFDs. In other words, the child can have data flows of its own, if these new `data flows are not attached to external entities.
If you have added a new data flow to a child DFD and it makes the DFDs unbalanced, backtrack to the parent diagram and add it in.
In this instance, the parent is the context diagram and the child is the Level 0 DFD.
Finished!
Now repeat for the other processes in the Level 0 DFD.
How To Draw Level 2 DFDs
1 Choose one of the Level 1 DFDs
2 Identify if any of its processes require specifying in further detail
3 If yes, repeat the steps for drawing a Level 1 DFD but update the numbering and labels
4 Check the balancing
4 If no, choose another of the Level 1 DFDs
No more Level 1 DFDs left?
Finished!
What happens next?
If you need more levels, keep repeating the process.
When to stop making new levels?
When it is not possible to add more data flows. In other words, when all the system’s data flows are mapped out AND all the diagrams are balanced.
Next step?
For each of the “smallest” processes, write its logic and decision points as eithera decision tree, a decision table, a structure chart, or structured English.