The analyst needs a way of drawing what the system does without describing how it will be built. Structured analysis does this with diagrams of the flow of data.
Structured Analysis
Structured analysis is a method that models a system by the functions it performs and the data that flow between them. Its tools are the data flow diagram (DFD), the data dictionary, process specifications and the entity-relationship diagram. The method breaks the system into parts by top-down decomposition, giving a hierarchy of diagrams.
Data Flow Diagram
A DFD shows how data move through a system. It has four symbols. A process, drawn as a circle or a rounded box, transforms data. A data flow, drawn as an arrow with a name, shows data moving. A data store, drawn as two parallel lines, holds data for later use. An external entity, drawn as a rectangle, is a source or a destination of data outside the system. The context diagram, or level 0, shows the whole system as a single process with its external entities. Each process is then expanded into a lower-level diagram, which gives levels 1, 2 and so on. The rules are that a process must have at least one input and one output, data cannot flow directly between two stores or two entities, and the flows into a lower-level diagram must be balanced with those of the process that it expands.
Definition: Data flow diagram. A graphical model of the flow of data in a system, showing processes, data flows, data stores and external entities.
Data Dictionary
The data dictionary is an organised list of all the data elements in the system, with an exact definition of each. It gives the name, the aliases, the meaning, the type, and the structure of every data flow, store and element. A common notation uses = for "is composed of", + for "and", brackets [ | ] for a choice, braces { } for repetition and ( ) for an optional item. For example, student_record = roll_no + name + {subject + marks}. It keeps the meaning of data consistent across the team.
Table 2.3: DFD symbols
| Symbol | Shape | Meaning |
|---|---|---|
| Process | Circle | Transforms data |
| Data flow | Arrow | Data in motion |
| Data store | Open rectangle | Data at rest |
| External entity | Rectangle | Source or destination |
Example 2.3: DFD for admission
Problem: Draw a level 1 DFD for a college admission system in which a Student submits an application, the Office verifies it against the Records store, and a merit list is sent to the Student.
Solution:
- The external entity is Student. Processes are Verify application and Prepare merit list.
- The data store is Records.
- Connect the flows: application, verified data, merit list.
Result: The diagram below shows the processes, store and flows.
Common mistakes
- Joining two data stores directly by a data flow.
- Showing control or decisions in a DFD. It shows data only.
- Leaving a process without an input or without an output.
Key takeaways
- A DFD has processes, data flows, data stores and external entities.
- The context diagram shows the system as one process.
- Lower levels must balance with the higher level.
- The data dictionary defines every data element.
Practice questions
- What are the four symbols of a DFD?
- What is a context diagram?
- What is the data dictionary?
Answers to the practice questions
- Process, data flow, data store and external entity.
- A level 0 DFD showing the whole system as a single process with its external entities.
- An organised list of the definitions of all data in the system.
Sources
- Official BCA syllabus Advanced Software Engineering, course code 25BCA405DS01, Unit II
