Data Flow Diagrams (DFDs)
ICT2621 - Structured Systems Analysis and Design · Structured Analysis Techniques
Data Flow Diagrams (DFDs)
Data Flow Diagrams (DFDs) are a visual representation of how data moves through a system. They help to illustrate the flow of information, the processes that transform data, and the data stores involved. DFDs are essential in structured systems analysis and design as they provide a clear picture of how a system works without delving into implementation details.
Components of DFDs
DFDs consist of four main components:
- Processes: Represented by circles or ovals, processes describe actions that transform input data into output data. Each process should have a unique name and a number.
- Data Flows: Shown as arrows, data flows indicate the movement of data between processes, data stores, and external entities. Each data flow should be labelled to describe the information being transferred.
- Data Stores: Represented by open-ended rectangles, data stores are places where data is held for later use. They can be databases, files, or any storage medium.
- External Entities: Depicted as squares, external entities are sources or destinations of data outside the system. They can be users, other systems, or organisations.
Creating a DFD
To create a DFD, follow these steps:
- Identify the system: Clearly define the system you are analysing.
- Determine the processes: List the main processes that occur within the system.
- Identify data flows: Determine how data moves between processes, data stores, and external entities.
- Define data stores: Identify where data is stored within the system.
- Identify external entities: Determine who or what interacts with the system.
- Draw the DFD: Use standard symbols to represent the components and connect them with arrows to show data flows.
Example of a DFD
Let us consider a simple example of a library management system. The system has the following components:
- Processes: Borrow Book, Return Book, Search Catalogue
- Data Stores: Borrower Records, Book Inventory
- External Entities: Borrower, Librarian
Now, we can create a DFD for this system. The DFD will show how a borrower interacts with the system to borrow a book:
1. Borrower requests to borrow a book (data flow: Request to Borrow Book) → Process: Borrow Book → Data Store: Borrower Records (update record) → Data Store: Book Inventory (update inventory)In this DFD, the Borrower is an external entity that sends a request to the Borrow Book process. The Borrow Book process updates the Borrower Records and the Book Inventory data stores.
Remember: Each process must have both an input and an output. Ensure that every data flow is labelled and clear.
Levels of DFDs
DFDs can be created at different levels of detail:
- Context Diagram: This is the highest level of DFD. It shows the system as a single process and its interaction with external entities. It does not go into detail about the internal processes.
- Level 0 DFD: Also known as a high-level DFD, this diagram decomposes the context diagram into main processes and data flows.
- Level 1 DFD: This diagram breaks down one of the processes from the Level 0 DFD into more detailed processes and shows the data flows between them.
Example of Levels of DFDs
Continuing with the library management system, the context diagram would show the entire system as a single process with inputs from the Borrower and Librarian:
Borrower → Request to Borrow Book → Library Management System → Confirmation to BorrowerThe Level 0 DFD would break this down into three main processes:
1. Borrow Book 2. Return Book 3. Search CatalogueThe Level 1 DFD for the Borrow Book process could look like this:
Borrower → Request to Borrow Book → Process: Borrow Book → Update Borrower Records → Update Book InventoryWatch out: When creating DFDs, do not confuse data stores with processes. Data stores are where information is kept, while processes are actions that change or use that information.
Common Mistakes in DFDs
Here are some common mistakes to avoid when creating DFDs:
- Not labelling data flows clearly. Ensure that every arrow has a clear label describing the data being transferred.
- Overcomplicating the diagram. Keep the DFD simple and focused on the main processes and data flows.
- Missing processes or data stores. Ensure that you include all relevant components of the system.
- Confusing external entities with internal processes. Remember that external entities are outside the system.
Using DFDs in Systems Analysis
DFDs are useful in various stages of systems analysis:
- Requirements Gathering: They help identify and clarify user requirements by visualising how data flows through the system.
- System Design: DFDs assist in designing the system by providing a clear structure of processes and data flows.
- Communication: DFDs serve as a communication tool between stakeholders, ensuring everyone has a common understanding of the system.
Summary
- DFDs show how data moves through a system.
- They consist of processes, data flows, data stores, and external entities.
- DFDs can be created at different levels: context, Level 0, and Level 1.
- Common mistakes include unclear labels, overcomplication, and confusion between data stores and processes.
Check your understanding
- What are the four main components of a DFD?
- How do you create a Level 1 DFD?
- What is the difference between a context diagram and a Level 0 DFD?
- What are some common mistakes to avoid when creating DFDs?