TOPIC 5
KK24803 SOFTWARE DESIGN - PROCESS MODELLING (PART I)
Learning Outcome
Explain process modelling and DFD
Identify DFD elements
Construct a Context Diagram
Develop a Level 0 DFD from requirements
What is Process Modelling?
Definition: A representation method for illustrating how a system operates.
Functionality: It breaks down a system into smaller, understandable processes.
- Example: Mobile Banking System.
- Processes:
- Login
- Check Balance
- Transfer Money
- Data Movement Description:
- User enters login details → system verifies → system sends authentication result.
- Money Transfer Process Explanation:
- Input: Account number + amount.
- Process: Validate, deduct funds, and update account.
- Output: Confirmation message that the transfer was successful.Purpose: Helps clarify system requirements by making them:
- Visual
- Structured
- Easier to validateCommon Representation: Data Flow Diagram (DFD).
Data Flow Diagram (DFD)
Definition: A graphical representation that illustrates how data moves through a system and how it is processed.
DFD Components:
- How data enters the system
- How data is processed
- Where data is stored
- How data is outputted from the system
DFD Elements
ELEMENT - DESCRIPTION - NAMING RULE - SYMBOL:
- Data Flow: Movement of data between elements; Name with a noun only.
- Data Store: Where data is stored; Name with a noun only.
- External Entity: Source or destination outside the system; Name with a noun only.
- Process: Transforms input into output; Name with a verb + noun.Notation System: Gane & Sarson notation is used for representing Data Flow Diagrams. Each element plays a specific role in depicting system behavior and data flow.
Why Use DFD?
Visual Representation: Converts requirements into easily interpretable diagrams.
Clarity in Data Movement: Clearly visualizes how data flows between processes, distinguishing input, process, and output stages.
Identification of Missing Processes: Reveals steps that may have been overlooked in system design, enhancing requirement completeness.
Good vs Bad Naming in DFD
PROCESS NAMING:
- Good: Validate Login Process, Transfer, Generate Report.
- Bad: Login, Transfer, Processing.DATA FLOW NAMING:
- Good: Login Details, Transfer Request, Payment Information.
- Bad: Send Data, Process Info, Check Balance.
Common Mistakes in DFD
Process without Output: Each process must have both input and output; otherwise, it is incomplete.
Data Store without Input: Data stores must not exist in isolation; they must interact with processes.
Data Store without Output: Data that is stored needs to be retrieved or utilized.
Using Verbs for Data Flow: Data flow should represent the data rather than actions.
Missing Data Flow: Either processes are drawn without arrows indicating data input or output, or arrows lack labels.
Levels of Data Flow Diagram
DFD Development Levels: Created in multiple levels, progressing from a general overview to detailed specifications.
- Context Diagram (Level 0): Represents the entire system as one process, showcasing system boundaries and not including data stores.
- Level 0 DFD: Breaks the system into major processes, displaying significant functions.
- Level 1 DFD: Further divides Level 0 processes into smaller, detailed subprocesses.
- Level 2 DFD (optional): A deeper breakdown of complex processes.
Context Diagram
Definition: The highest-level DFD encapsulating the entire system as a single process while illustrating its interaction with external entities.
Key Features:
- Contains only one process (the entire system).
- Only includes external entities and data flows.
- Does not illustrate internal workings of the system but shows inputs and outputs.
Building a Context Diagram - Steps
Identify the system as one process (ID = 0).
Analyze functional requirements to identify external entities.
- Utilize use case diagrams for identifying actors.Analyze functional requirements to identify data inputs and outputs.
- Use activity diagrams for understanding data movement.Connect external entities with data flows, labeling arrows appropriately.
Example: Mobile Banking App
Functional Requirements of the System:
- Allows customer to log in, view account balance, transfer funds, and pay bills.
- Processes transactions by validating user credentials, retrieving account information, updating balances, and recording transaction details.
- Interacts with external systems by sending payment instructions and receiving confirmations.
Context Diagram - Mobile Banking App
Process Name: Mobile Banking System
External Entities:
- Customer
- Bank System (core banking)
- BillerData Flows:
- Inputs from Customer: Login details, balance inquiry request, transfer request, bill payment request.
- Inputs from Bank System: Account balance/validation data.
- Inputs from Biller: Payment acknowledgment.
- Outputs to Customer: Authentication result, account information, transaction confirmation, payment confirmation.
- Outputs to Bank System: Account update request.
- Outputs to Biller: Payment instruction.
Level 0 DFD
Represents the first decomposition of the system into major internal processes, illustrating internal workings.
Components:
- Multiple main functions of the system
- Data flows between processes
- Inclusion of data stores (if necessary)
- External entities are still representedComparison:
- Context Diagram: One process only; external view.
- Level 0 DFD: Multiple processes; internal view.Does not provide detailed workflow or programming logic (which will be in Level 1).
Building a Level 0 DFD - Steps
Reference functional requirements to identify internal operations of the system.
- Focus on functions/activities (verbs): Authenticate, process, update, validate.Group related functional requirements into logical categories.
Identify core processes based on these functional groups.
Identify necessary data stores; look for keywords like create, record, retrieve, maintain, update.
Define internal data flows between processes, between processes and stores, and between external entities and processes.
Example: Mobile Banking App - Grouped Functional Requirements
Group 1: Authentication
- Activities: Log in, validate user credentials.Group 2: Account Management
- Activities: View account balance and information, retrieve account information.Group 3: Fund Transfer
- Activities: Transfer funds, update balances, record transactions.Group 4: Bill Payment
- Activities: Pay bills and manage payment instructions.
Mapping to Process Group
Process Group 1: Authentication
- Process 1.0: Authenticate UserProcess Group 2: Account Management
- Process 2.0: View AccountProcess Group 3: Fund Transfer
- Process 3.0: Transfer FundsProcess Group 4: Bill Payment
- Process 4.0: Pay Bills
Identifying Data Stores
Example Identified Data Stores:
- DATA STORE 1: Account Data — related to account balances and information retrieval.
- DATA STORE 2: Transactions Record — concerns transaction details and fund management.
Identifying Internal Data Flows
Overview of Inputs for Level 0 DFD from previous context:
- From Customer: Login details, balance requests, transfer requests, payment requests.
- From Bank System: Validation data, account balance.
- From Biller: Acknowledgment of payments.Overview of Outputs for Level 0 DFD:
- To Customer: Authentication results, data confirmations.
- To Bank System: Update requests concerning accounts.
- To Biller: Instructions for payment processing.
Quick Check (Basic Validation)
Ensure Adequate DFD Structure:
Each process has at least one input and output.
All data flows are labeled with nouns.
There is alignment with the Context Diagram.
Inclusion of all external entities.
Appropriate use of data stores.
Summary
Process Modelling: A method for representing system data processing.
Starting Point for DFD Development: Functional requirements.
Context Diagram: Represents the system as a single process, focusing on external interactions and data flow.
Level 0 DFD: Breaks the system into major interconnected processes, illustrating internal structure and data stores as necessary.
What is the primary purpose of process modeling?
A) To represent the system visually
B) To analyze system requirements
C) To ensure system functionality
D) All of the above
Answer: D
What does DFD stand for?
A) Data Flow Diagram
B) Data Functional Diagram
C) Digital Flow Diagram
D) None of the above
Answer: A
Which of the following elements is NOT part of a DFD?
A) Data Flow
B) Process
C) Functionality
D) Data Store
Answer: C
A context diagram shows:
A) Internal workings of the system
B) Major subprocesses of a system
C) The entire system as one process
D) None of the above
Answer: C
In DFD, data flows are represented by:
A) Circles
B) Squares
C) Arrows
D) Dashed lines
Answer: C
What is an external entity in the context of a DFD?
A) A process within the system
B) A component that stores data
C) A source or destination outside the system
D) None of the above
Answer: C
The notation system commonly used for DFDs is:
A) UML
B) Gane & Sarson
C) IDEF0
D) BPMN
Answer: B
An example of a good process name in DFD is:
A) Data Processing
B) Transfer Funds
C) Operations
D) Process Data
Answer: B
Which of the following is a common mistake in DFDs?
A) Having processes without outputs
B) Missing external entities
C) Using nouns for data flows
D) A and B
Answer: D
A Level 0 DFD provides:
A) A very detailed view of the system
B) A high-level overview of the system with major processes
C) No useful information
D) Just data flows without processes
Answer: B
Which level of DFD typically contains the highest number of processes?
A) Context Diagram
B) Level 0 DFD
C) Level 1 DFD
D) Level 2 DFD
Answer: D
What are data stores used for in a DFD?
A) To show flow of data
B) To represent external entities
C) To store data for processes to retrieve
D) None of the above
Answer: C
In a DFD, how should inputs be labeled?
A) With verbs
B) With adjectives
C) With nouns only
D) Any naming style
Answer: C
Which diagram can help to identify actors for use in a context diagram?
A) Data Flow Diagram
B) Activity Diagram
C) Use Case Diagram
D) Sequence Diagram
Answer: C
What type of diagram illustrates how data moves through a system?
A) Use Case Diagram
B) Flowchart
C) Process Flow Diagram
D) Data Flow Diagram
Answer: D
Which of the following is a critical step in building a context diagram?
A) Identify internal processes
B) Analyze secondary processes
C) Identify external entities
D) Check existing data flows
Answer: C
What should flow into a data store?
A) Process outputs
B) External entity data
C) Data that is being used
D) Both A and B
Answer: D
How does a Level 1 DFD differ from a Level 0 DFD?
A) It has fewer processes
B) It contains significant functions broken down into subprocesses
C) It is less detailed
D) None of the above
Answer: B
Which of the following would be a bad naming example for a data flow?
A) User Registration Data
B) Payment Info
C) Send Login Credentials
D) Account Info
Answer: C
The main function of the DFD is to:
A) Enhance business processes
B) Help clarify how data travels through a system
C) Be a tool for project management
D) None of the above
Answer: B
Data stores are used in Data Flow Diagrams (DFDs) to represent where data is stored for processes to retrieve. They serve to illustrate the components of a system that hold and manage data, ensuring that processes can access the necessary information for their operations. Data stores may contain data that is created, updated, and maintained throughout the system's processes.