0% found this document useful (0 votes)
25 views12 pages

System Analysis and Design 4

This document provides an overview of Data Flow Diagrams (DFDs), a graphical representation technique used in system analysis to illustrate data flow within a system. It details the components, features, merits, demerits, and hierarchical levels of DFDs, along with practical applications and common symbols. Additionally, it includes multiple-choice questions to test understanding of DFD concepts.

Uploaded by

ralwied621
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views12 pages

System Analysis and Design 4

This document provides an overview of Data Flow Diagrams (DFDs), a graphical representation technique used in system analysis to illustrate data flow within a system. It details the components, features, merits, demerits, and hierarchical levels of DFDs, along with practical applications and common symbols. Additionally, it includes multiple-choice questions to test understanding of DFD concepts.

Uploaded by

ralwied621
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

University of Kerbala

College of Computer Science and Information


Technology

Lecture Note
(4)

2024 – 2025

Assist. Prof. Dr. Ayad Albadri


1
Modeling Techniques
Modeling Techniques: Data Flow Diagrams (DFDs)
Data Flow Diagrams (DFDs) are a graphical representation technique used in
system analysis and design to depict the flow of data within a system. They
provide a visual representation of how data moves through various processes
and stores within a system, highlighting the interactions between different
components.
1. Meaning:
Data Flow Diagram (DFD): A DFD is a graphical representation of a system
that shows the flow of data between processes, data stores, and external
entities. It uses standardized symbols to represent components and their
interactions, helping stakeholders understand the system's data flow and
processing logic.
2. Features:
Components: DFDs consist of four main components: processes, data
stores, data flows, and external entities.
Hierarchical Structure: DFDs can be decomposed into multiple levels
of detail, from a high-level overview to detailed diagrams focusing on
specific processes.
Standardized Symbols: DFDs use standardized symbols such as circles
for processes, rectangles for data stores, arrows for data flows, and
squares for external entities.
Data Transformation: Processes in DFDs transform input data into
output data through various operations or computations.

3. Merits:
Clarity: Provides a clear and intuitive visualization of data flow and
processing logic within a system.
Communication: Facilitates communication between stakeholders by
providing a common visual language for discussing system
requirements and design.

Assist. Prof. Dr. Ayad Albadri


2
Analysis: Helps identify inefficiencies, redundancies, and bottlenecks
in data flow and processing, enabling optimization.
Documentation: Serves as a documentation tool for capturing system
requirements, design decisions, and implementation details.
4. Demerits:
Complexity: DFDs can become complex and difficult to manage,
especially for large systems with numerous processes and data flows.
Abstraction: May oversimplify certain aspects of the system, leading
to ambiguity or misunderstanding of system behavior.
Static Representation: DFDs represent a snapshot of the system at a
specific point in time and may not capture dynamic aspects such as
real-time interactions or system behavior over time.
5. DFD Levels
1. Level 0 DFD (Context Diagram)
 Purpose: Provides a high-level overview of the entire system as a
single process.
 Components:
One central process (e.g., "Online Shopping System").
External entities (sources/destinations of data, e.g.,
Customer, Bank).
Data flows between the system and external entities.
 No data stores (they appear starting at Level 1).
 Example:
Customer ➔ (Order Request) ➔ [Online Shopping System]
➔ (Confirmation Email) ➔ Customer.
2. Level 1 DFD
 Purpose: Breaks the Level 0 process into major sub-processes and
introduces data stores.
 Components:
o Sub-processes (e.g., "Place Order," "Process Payment," "Ship
Order").
o Data stores (e.g., Customer Database, Inventory).

Assist. Prof. Dr. Ayad Albadri


3
oData flows between processes, external entities, and data
stores.
 Rules:
o Inputs/outputs must match those in Level 0 (balancing).
o Processes are numbered (e.g., 1.0, 2.0).
 Example:
o Process 1.0: "Place Order" ➔ Data Store: "Shopping Cart."
3. Level 2 DFD
 Purpose: Decomposes Level 1 processes into suitable steps.
 Components:
o Detailed sub-processes (e.g., 1.1: "Add to Cart," 1.2: "Validate
Payment").
o Data flows and data stores specific to each sub-process.
 Rules:
o Processes are numbered hierarchically (e.g., 1.1, 1.2).
o Must balance with its parent Level 1 process.
 Example:
o Process 1.1: "Add to Cart" ➔ Data Store: "Cart Items."
4. Level 3+ DFD
 Purpose: Provides ultra-detailed views of complex sub-processes
(rarely used).
 Components:
o Further decomposition of Level 2 processes (e.g., 1.1.1: "Check
Item Stock").
 Use Case: Only for highly complex systems (e.g., air traffic control).

6. Key Rules for DFD Levels


1. Balancing: Inputs/outputs of a parent process must match its child
diagram.
o Example: If Level 0 shows "Order Request" as input, Level 1
must include it.
2. No Control Logic: DFDs show data flow, not decision-making (use
flowcharts for logic).

Assist. Prof. Dr. Ayad Albadri


4
3. No Data Flows Between External Entities: All interactions must pass
through a process.
7. When to Stop Decomposing?
 Stop when processes are atomic (cannot be split further without
redundancy).
 Avoid overcomplicating (Level 2 is often sufficient).

Visual Comparison

Level Complexity Audience Focus


Stakeholders, System boundaries &
0 Simplest
Managers interactions.
Core processes & data
1 Moderate Analysts, Designers
stores.
Developers,
2 Detailed Step-by-step workflows.
Engineers

Key Points
1. Level 0: "Big picture" context.
2. Level 1: Major processes and data stores.
3. Level 2: Granular task breakdown.
4. Balance inputs/outputs across levels.
5. DFDs focus on data flow, not control logic.

Example: Online Shopping System

Level Process Components


0 Online Shopping External Entities: Customer, Bank; Data Flows:
System Order Request, Payment Details.
1 1.0: Place Order Data Stores: Shopping Cart, Inventory; Sub-
processes: Validate Order.
2 1.1: Add to Cart Data Flows: Item Selection, Stock Check.

Assist. Prof. Dr. Ayad Albadri


5
6. Practical Application:

Example: Online Shopping System


Consider an online shopping system where customers browse products, add
items to their cart, and complete the checkout process. A DFD for this system
may include:

1. Processes:
Search Products
Add to Cart
Update Cart
Checkout
2. Data Stores:
Product Database
Customer Database
Shopping Cart
3. Data Flows:
Product Information Flowing from Product Database to Search
Products Process
Selected Products Flowing from Search Products Process to Add to Cart
Process

Updated Cart Information Flowing from Update Cart Process to


Shopping Cart Data Store
Order Information Flowing from Checkout Process to Customer
Database
4. External Entities:
o Customer (Inputs search queries, selects products)
o Payment Gateway (Processes payment information)

Assist. Prof. Dr. Ayad Albadri


6
Common Flow Diagram Symbols and Meanings
Symbol Name Description

It is represented by a rectangle and simply depicts a source or


Entity
termination of the diagram by mapping real-world entities.

It is represented by a circle and depicts how the data is


Process
handled and processed in the system.

Data It is represented by two parallel lines and depicts a location


Store where data is stored in the system.

Data It is represented by directional lines and depicts the flow of


Flow data from one location to another.

DFD Examples

Assist. Prof. Dr. Ayad Albadri


7
Assist. Prof. Dr. Ayad Albadri
8
Data Flow Diagram (DFD) MCQs

Assist. Prof. Dr. Ayad Albadri


9
1. Which of the following is NOT a component of a DFD?
A) Process
B) Data Store
C) Decision Node
D) External Entity
Answer: C) Decision Node
Explanation: Decision nodes (e.g., diamonds) are used in flowcharts, not
DFDs. DFD components include processes, data stores, external entities,
and data flows.
2. In a DFD, what does a rectangle represent?
A) Process
B) Data Store
C) External Entity
D) Data Flow
Answer: C) External Entity
Explanation: Rectangles denote external entities (sources/destinations of
data outside the system). Processes are circles/ovals, data stores are
horizontal lines/open rectangles, and data flows are arrows.
3. Which level of DFD provides the most granular view of a system?
A) Level 0 (Context Diagram)
B) Level 1
C) Level 2
D) Level 3
Answer: C) Level 2
Explanation: DFDs are hierarchical:
 Level 0: Overview (1 process + external entities).
 Level 1: Breaks Level 0 into sub-processes.
 Level 2: Further decomposes Level 1 processes for granularity.
4. What is the primary purpose of a data store in a DFD?
A) To transform data
B) To represent a database or repository
C) To interact with external users
D) To control system logic

Assist. Prof. Dr. Ayad Albadri


10
Answer: B) To represent a database or repository
Explanation: Data stores (e.g., 📁) hold data for later use (e.g., a customer
database). Processes (🔄) transform data, and external entities (👤) interact
with the system.
5. Which rule applies to DFDs?
A) Data flows can directly connect two external entities.
B) Data flows can connect two data stores.
C) Processes must have both input and output data flows.
D) Control flows are included.
Answer: C) Processes must have both input and output data flows.
Explanation: Processes cannot exist without inputs and outputs. Data
flows cannot directly link external entities or data stores. Control flows (e.g.,
"yes/no" logic) are part of flowcharts, not DFDs.
6. In a Level 0 DFD (context diagram), how many processes are shown?
A) One
B) Two
C) Depends on system complexity
D) Zero
Answer: A) One
Explanation: A Level 0 DFD represents the entire system as one
process interacting with external entities.
7. Which diagramming mistake violates DFD rules?
A) A data flow from an external entity to a process.
B) A data flow from a data store to a process.
C) A data flow from a process to an external entity.
D) A data flow from one external entity to another.
Answer: D) A data flow from one external entity to another.
Explanation: External entities cannot directly exchange data; all interactions
must pass through a process.
8. What does balancing a DFD mean?
A) Ensuring equal numbers of processes and data stores.
B) Matching inputs/outputs of parent and child diagrams.
C) Using consistent symbols across levels.
D) Avoiding external entities in lower-level diagrams.

Assist. Prof. Dr. Ayad Albadri


11
Answer: B) Matching inputs/outputs of parent and child diagrams.
Explanation: Balancing ensures inputs/outputs of a parent process (e.g.,
Level 0) match those in its decomposed child diagram (e.g., Level 1).
9. Which term describes breaking down a process into sub-processes in
a DFD?
A) Normalization
B) Decomposition
C) Aggregation
D) Generalization
Answer: B) Decomposition
Explanation: Decomposition splits a high-level process into detailed sub-
processes (e.g., Level 0 → Level 1).
10. Which of the following is NOT represented in a DFD?
A) Data transformation
B) System logic (e.g., if-else conditions)
C) Data storage
D) Interactions with external systems
Answer: B) System logic (e.g., if-else conditions)
Explanation: DFDs show data flow, not control logic. System logic
(decisions, loops) is modeled in flowcharts or UML activity diagrams.

Assist. Prof. Dr. Ayad Albadri


12

You might also like