TOPIC 6

KK24803 SOFTWARE DESIGN NOTES

SOFTWARE DESIGN PROCESS MODELLING (PART II)

Learning Outcomes
  • Decompose Level 0 into Level 1 DFD.

  • Explain balancing clearly.

  • Decide when Level 2 is needed.

  • Identify common DFD errors.

Recap of Key Concepts
  • Context Diagram: Represents the big picture with a single process.

  • Level 0 DFD: Shows major processes, typically between 3 to 7.

  • Focus: Emphasizes how data moves within the system.

What is Level 1 DFD?
  • Definition: A decomposition of one Level 0 process.

  • Purpose:
        - Breaks the Level 0 process into smaller sub-processes.
        - Shows detailed internal data flow.

  • Importance: Level 0 is too general, hiding business logic, while Level 1 provides necessary detail by zooming into a specific process.

  • Comparison between Level 0 and Level 1 DFD:
        - Level 0: Overall system view with one major process (black box).
        - Level 1: Detailed internal workflow of that process.
        - Example processes:
          - Level 0: Transfer Funds, Manage Account, View Statement.
          - Level 1 for Transfer Funds: Validate, Check, Execute, Update.

Parent–Child Relationship in DFD
  • Parent Process:
        - Exists in Level 0 DFD as a major system function.
        - Too general to show internal steps (e.g., Transfer Funds).

  • Child Processes:
        - Derive from one Parent process.
        - Represent detailed steps inside the Parent (e.g., for Transfer Funds: Validate Account, Check Balance, Execute Transfer, Update Records).
        - A Parent can have multiple Child processes, but Child processes only belong to their respective Parent.

Transition from Level 0 to Level 1 DFD
  • Step 1: Start with Level 0 Process (e.g., Transfer Funds).

  • Step 2: Identify inner workings of the process:
        - Determine necessary steps needed to complete the process (refer to Activity Diagram and Functional Requirements).

  • Step 3: Convert steps into processes:
        - Each identified step is converted into a Level 1 process:
            - Check Balance
            - Execute Transfer
            - Update Records

Level 0 DFD Example: Mobile Banking System
  • Processes:
        - 1.0 Authenticate User: Includes validation results, account information, and transaction confirmation.
        - 2.0 Balance Inquiry: Incorporates account details and balance info.
        - 3.0 Transfer Funds: Manages transfer requests, fund status, and transaction details.
        - 4.0 Pay Bills: Handles bill payment requests and confirmations.

Level 1 DFD Example: Transfer Funds Process
  • Unpacking the process involves the previously identified steps:
        - Check Balance
        - Execute Transfer
        - Update Records

Level 2 DFD (Further Decomposition)
  • Definition: A breakdown of a Level 1 process into even more detailed steps.

  • When to use Level 2:
        - When a Level 1 process remains complex and requires clearer internal logic.
        - Commonly used for transaction-heavy processes.

  • Example for Level 1 Execute Transfer:
        - Can be broken down into:
            - Verify transfer details
            - Debit sender account
            - Credit receiver account
            - Confirm transaction execution.

DFD Balancing & Validation
  • Definition of Balancing: Ensures that Level 1 DFD must be consistent with Level 0 DFD:
        - Inputs and outputs must stay the same.
        - No new external data should appear.
        - No original data should disappear.

  • Importance: Ensures correctness of decomposition, maintains consistency of the system, and prevents incorrect interpretation of DFD.

  • Balancing Example with Transfer Funds:
        - Level 0 DFD:
            - Input: Transfer request from Customer.
            - Output: Transaction confirmation to Customer.
        - Level 1 DFD must preserve the same input and output.

Common Balancing Mistakes
  1. Adding new external input in Level 1:
        - Example: Introducing a request from the Bank System not present in Level 0.

  2. Missing outputs from Level 0:
        - Example: Omitting transaction confirmations.

  3. Changing meaning of data flow:
        - Example: Splitting “transfer request” into unrelated inputs.

  4. Consequences of Errors:
        - Unbalanced DFD leads to an invalid system model and incorrect analysis results.
        - Level 1 must not alter WHAT enters and exits the system, only HOW it is processed internally.

Changes to Level 0 DFD
  • Can Level 0 DFD Be Changed?: It is generally fixed during the balancing exercise.

  • Only change Level 0 if:
        - Requirements were misunderstood.
        - System scope is revised.
        - Missing external interactions are identified during analysis.

  • Rule: Level 0 serves as the reference model for decomposition.

Iterative vs Fixed Design
  • Learning Context: Level 0 remains fixed, and Level 1 must conform to it, focusing on balancing correctness.

  • Real System Analysis: DFD evolves; Level 0 may be revised after deeper analysis, prompting updates to Level 1.

  • Teaching Context: Classroom DFDs are controlled and fixed for learning.

Summary
  • Students should now be able to:
        - Decompose Level 0 into Level 1 DFD.
        - Identify external entities and data stores.
        - Apply balancing rules correctly.
        - Avoid common DFD errors.
        - Understand when Level 2 is needed.

Conclusion
  • Appreciation for the material presented and understanding the complexities of DFDs in software design.

  1. What is the purpose of a Context Diagram?

    • A) To break down processes into smaller parts

    • B) To represent the big picture with a single process

    • C) To show detailed internal data flow

    • D) None of the above

    • Answer: B

  2. How many major processes should a Level 0 DFD typically show?

    • A) 1-2

    • B) 3-7

    • C) 8-10

    • D) 10-15

    • Answer: B

  3. What does a Level 1 DFD focus on?

    • A) Overview of the system

    • B) Major processes

    • C) Detailed internal workflow

    • D) External entities

    • Answer: C

  4. What is a Parent Process in DFD?

    • A) The overall system view

    • B) A process that contains multiple child processes

    • C) An external entity

    • D) None of the above

    • Answer: B

  5. When is it necessary to create a Level 2 DFD?

    • A) When the Level 1 process is too simple

    • B) When the Level 1 process remains complex

    • C) Only for graphical representation

    • D) None of the above

    • Answer: B

  6. Which of the following is NOT a common balancing mistake?

    • A) Adding a new external input

    • B) Missing outputs from Level 0

    • C) Incorrect process naming

    • D) Changing meaning of data flow

    • Answer: C

  7. What does DFD balancing ensure?

    • A) Level 1 DFD does not change the input/output

    • B) It adds new data flows

    • C) It simplifies the system

    • D) None of the above

    • Answer: A

  8. Which process is NOT a Level 1 process for Transfer Funds?

    • A) Validate Account

    • B) Check Balance

    • C) Execute Transfer

    • D) Pay Bills

    • Answer: D

  9. How can Level 0 DFD be changed?

    • A) Due to misunderstood requirements

    • B) If the system scope revised

    • C) Identifying missing interactions

    • D) All of the above

    • Answer: D

  10. What is the significance of the Iterative Design approach in DFD?

    • A) Level 0 must always remain fixed

    • B) Allows for revisions during deeper analyses

    • C) Ignore feedback from Level 1

    • D) None of the above

    • Answer: B

  11. Which type of diagram would you use to decompose a Level 0 process?

    • A) Context Diagram

    • B) Activity Diagram

    • C) Level 1 DFD

    • D) Flowchart

    • Answer: C

  12. What is an example of a common Level 0 DFD process?

    • A) Validate Account

    • B) Transfer Funds

    • C) Update Records

    • D) Execute Transfer

    • Answer: B

  13. Which of the following is an input for the Level 0 DFD of Transfer Funds?

    • A) Transaction Confirmation

    • B) Transfer Request from Customer

    • C) Balance Inquiry

    • D) Account Info

    • Answer: B

  14. When can you determine that no new data should appear in a Level 1 DFD?

    • A) During balancing

    • B) During verification

    • C) Always

    • D) Never

    • Answer: A

  15. What aspect does the Level 1 DFD provide that Level 0 does not?

    • A) Major processes

    • B) System overview

    • C) Detailed internal data flow

    • D) External entities

    • Answer: C

  16. The transfer process in Level 1 should NOT include which of the following?

    • A) Verify Transfer Details

    • B) Debit Sender Account

    • C) Credit Receiver Account

    • D) Add new requirements

    • Answer: D

  17. What does changing the meaning of data flow in a DFD result in?

    • A) Balanced DFD

    • B) Increased system understanding

    • C) Unbalanced DFD

    • D) Improved clarity

    • Answer: C

  18. What is essential in verifying a Level 1 DFD?

    • A) Ensuring it uses color coding

    • B) Maintaining consistency with Level 0 DFD

    • C) Changing the output format

    • D) Adding new data stores

    • Answer: B

  19. What typically happens if a common balancing mistake is made?

    • A) It leads to a clear model

    • B) There are no consequences

    • C) It creates an invalid system model

    • D) It enhances the model

    • Answer: C

  20. What concluding point should students understand regarding DFDs?

    • A) They involve complex mathematics

    • B) Balancing DFD is irrelevant

    • C) Understanding complexities is important

    • D) All diagrams are interchangeable

    • Answer: C