Lesson 4 DFD Diagrams in Analysis (1)
Lesson 4 DFD Diagrams in Analysis (1)
Page 1 of 18
The key elements of a Data Flow Diagram (DFD) include:
1. Processes:
o Represent activities that transform data.
4. External Entities:
o Represent external systems, users, or organizations that interact with the
system.
Page 2 of 18
o Symbol: Rectangle.
o Example: "Customer" or "Bank".
2. Each process can go to any other symbol (other processes, data store, and entities).
3. Each data store should have at least one incoming and at least one outgoing data flow.
Page 3 of 18
5. Data flows cannot cross with each other.
6. Data stores cannot be connected to external entities. Otherwise, it means you’re allowing
an external entity access to your data files and stores.
7. The labels of processes can be verb phrases. Data stores are displayed by nouns.
8. Data flows cannot run between two external entities without going through a process (as
you will see in the data flow diagram examples below).
Step2: Create a list of all external entities (all people and systems).
Step3: Create a list of the data flows.
Step4: Draw the diagram.
Page 4 of 18
What are the DFD levels (DFD-0, DFD-1, and DFD-2).?
In a Data Flow Diagram (DFD), Level 0 is also called the Context Diagram. It
represents the system as a single high-level process with its inputs and outputs,
showing the system in its simplest form without going into the details of internal
processes.
DFD level 0 (DFD-0): Also known as "DFD Context", in this level, we place our system as one
process in the centre and focus on inbound and outbound from external elements.
Example of a DFD of a coffee shop:
The main process is P1 (Coffee Shop), the red dotted cycle represents our trusted zone
Page 5 of 18
DFD Level 1 (DFD-1): Decomposed of DFD-0 to a main business process. It usually represents
the main functional areas of the system
In our example, we took our Coffee Shop(P1) and separated it into 2 main processes P1.1
(Order Management) and P1.2 (Supplies Management).
As you can see, our trusted zone is still the same (contain all "break-down" of the main
process)
A Level 1 DFD is a more detailed version of the Level 0 DFD (Context Diagram). It breaks
down the single process from Level 0 into multiple sub-processes, providing a clearer
understanding of how the system operates internally.
Key features of Level 1 DFD:
1. Decomposition of the System:
o The single process from Level 0 is decomposed into several smaller, more
detailed processes. These processes represent major functions or tasks within
the system.
o The high-level process from Level 0 is shown as a process at the center, with
multiple sub-processes around it.
2. Data Flows:
Page 6 of 18
o Level 1 continues to show how data flows between processes, external
entities, and data stores.
o It expands on the flow of data that was shown in the Level 0 DFD, illustrating
how data moves between individual components of the system.
3. Internal Data Stores:
o Unlike Level 0, Level 1 includes data stores that show where data is stored
within the system (e.g., databases, files).
o Data stores are used to keep track of information for future use by different
processes.
4. External Entities:
o External entities from Level 0 (like users, customers, or other systems) remain
present in Level 1, showing how they interact with the system’s sub-
processes.
DFD level 2 (DFD-2): Decomposed of DFD-1 (same as DFD-1 is to DFD-0), although, usually in
this level, we start looking at the level of services.
A Level 2 DFD is a further decomposition of a Level 1 DFD, providing even more detail about
the internal processes of the system. At Level 2, each of the processes from the Level 1 DFD
is broken down into smaller sub-processes, showing more granular steps of how data is
handled and transformed within the system.
Page 7 of 18
Key features of Level 2 DFD:
1. Decomposition of Processes:
o The processes in the Level 1 DFD are broken down into more specific sub-
processes.
o Each of these sub-processes represents a specific action or operation that
contributes to completing the overall task.
Page 8 of 18
Data Flow Diagrams (DFDs) are used to represent the flow of data within a system. They can
be categorized into two types: Physical DFDs and Logical DFDs. Here’s a comparison of the
two:
Physical Data Flow Diagrams
Definition: Represents the actual implementation of a system, including the
hardware and software components involved.
Focus: Emphasizes how data is physically processed, including the specific
technologies and processes used.
Components:
Page 9 of 18
Example Use Case: Mapping out a banking system that includes specific software,
databases, and user interfaces.
Logical Data Flow Diagrams
Definition: Represents the abstract flow of data, regardless of how the system is
implemented.
Focus: Emphasizes what the system does and how data moves between processes
without getting into implementation details.
Components:
Page 10 of 18
Page 11 of 18
Business case study
DFD for Inventory Management System
0 Level DFD for Inventory Management System
The parameters of the inventory management system are specified in a context diagram
(level 0 data-flow diagram). It illustrates how information moves between the system and its
external entities.
Through DFD level 0, the entire concept of the system is demonstrated in a single process.
For example:
The diagram’s arrows show the direction in which the data input flowed. The major function
is labeled as the “inventory management system,” and its name sparks the discussion under
it.
Page 12 of 18
The external entities that cause the system to perform a certain function are as follows:
Customers
System Admin
The given example reveals the sub-processes under inventory management. Each of them
complements in showing how exactly the inventory management system works. The sub-
processes are:
Manage Customer Information
Page 13 of 18
Manage Sales Information
Manage Stocks
Manage Transaction and Payments
The process of managing customer information includes the gathering of the customer’s
basic data. This data is used for transactions, purchasing, and inventory purposes.
Now, the system also has to keep track and manage the business sales, which happens
when a customer buys something from the store through the system.
In the case of inventories, the system possesses an algorithm that automatically monitors
and manages stocks for the establishment. This enables the admin (owner) to manage the
business efficiently. Its management will be based on the count of products and purchasing
inputs.
The system also manages the transactions and payments of each customer to complete the
overall function. Then the transactions were saved in the database for inventory purposes.
Be aware that the basis for these concepts comes from the basic activities associated with
managing practical inventories. The suggested idea can be used as is or altered to serve your
intended purpose.
You can stop working at this point because you already understand how the project will
function overall. The next level, though, might pique your interest due to what it is and how
it functions.
DFD Level 2 for Inventory Management System
Among the preceding levels, DFD level 2 has the highest concept abstraction. The reason for
this is that this level describes the processes (if any) that fall under the level 1 sub-process.
At this point, let’s focus on a crucial aspect of the data flow diagram.
For example, Databases
Page 14 of 18
DFD Level 2 for Inventory Management System
The example is supposed to clarify one of level 1’s sub-processes. Instead, the system’s
database (data store) is highlighted more.
The databases of the inventory management system are composed of:
Customer Database
Purchases and Sales Database
Product Database
Payment Database
These data repositories are responsible for maintaining data security and accessibility. The
system will only provide information to the user who requested it.
Page 15 of 18
Tools for DFD Balancing
1. Lucidchart− Offers templates and tools to visualize hierarchical DFDs, with features
that support multi-level balancing.
2. Microsoft Visio− A powerful tool for creating structured DFDs, with built-in support
for aligning and balancing flows.
3. SmartDraw− Provides easy-to-use DFD templates that aid in the creation of balanced
diagrams.
4. Visual Paradigm− Offers automated checking for balanced DFDs, helping analysts
avoid inconsistencies.
5. Draw.io− A free tool that supports multiple DFD levels, making balancing easier for
beginners.
Revision Question
Solve Business problem using DFD levels diagram (use case study below)
Case Study: Online Retail Store System
You are tasked with designing an Online Retail Store System that allows customers to
browse products, place orders, make payments, and receive order confirmations. The system
interacts with external entities such as Customers, Suppliers, and Payment Processors.
The system includes the following core functionalities:
1. Customer Registration & Login: Customers need to create an account and log in
before making a purchase.
2. Product Browsing: Customers can browse available products categorized by type.
3. Order Placement: After selecting products, customers place an order, which includes
product details and quantities.
4. Payment Processing: Once the order is placed, the system processes the payment
through a secure gateway.
5. Order Confirmation: After successful payment, the system generates and sends an
order confirmation email to the customer.
Task 1: Create a Level 0 DFD for the Online Retail Store System.
In your Level 0 DFD:
Page 16 of 18
Show the major data flows between the system and external entities.
Task 2: Create a Level 1 DFD that decomposes the system into sub-processes.
Task 3: Create a Level 2 DFD for the "Payment Processing" process from Level 1.
Guidelines:
1. Use proper DFD symbols: circles/rounded rectangles for processes, arrows for data
flows, rectangles for external entities, and open-ended rectangles for data stores.
2. Label processes and data flows clearly and logically.
3. Make sure to maintain clarity at each level of decomposition.
4. Ensure consistency in naming conventions across all levels.
Question Objective:
Assess your understanding of how to decompose a system into manageable
processes using DFDs.
Evaluate your ability to show data flows between system components.
Test your knowledge of representing complex processes and data management
within a system.
Study References
https://www.visual-paradigm.com/guide/data-flow-diagram/what-is-data-flow-diagram/
Videos references
Page 17 of 18
https://www.youtube.com/watch?v=ZB2CcVXzWgk
Page 18 of 18