05-DFD part 2

download 05-DFD part 2

of 26

Transcript of 05-DFD part 2

  • 8/11/2019 05-DFD part 2

    1/26

    DATA FLOW

    DIAGRAM(PART 2)

  • 8/11/2019 05-DFD part 2

    2/26

    Four basic rules

    The DFD must have at least one process, and must not

    have any freestanding objects or objects connected to

    themselves

    A process must receive at least one data flow coming

    into the process and create at least one data flow leaving

    from the process

    A data store should be connected at least one process

    External entities should not be connected to each other.

    Although they communicate independently, that

    communication is not part of the system we design using

    DFDs

  • 8/11/2019 05-DFD part 2

    3/26

    Creating Data Flow Diagrams

    Creating DFDs is a highly iterative process ofgradual refinement.

    General steps:

    1. Create a preliminary Context Diagram

    2. Identify Use Cases, i.e. the ways in which usersmost commonly use the system

    3. Create DFD fragments for each use case

    4. Create a Level 0 diagram from fragments5. Decompose to Level 1,2,

    6. Go to step 1 and revise as necessary

    7. Validate DFDs with users.

  • 8/11/2019 05-DFD part 2

    4/26

    Context Diagram

    Top-level view of IS

    A data flow diagram (DFD) of the scope of an

    organizational system that shows the systemboundaries, external entities that interact with the

    system and the major information flows between the

    entities and the system

    Example: Order system that a company uses toenter orders and apply payments against a

    customers balance

  • 8/11/2019 05-DFD part 2

    5/26

    DFD RulesContext Diagram

    One process, numbered 0.

    Sources and sinks (external entities) assquares

    Main data flows depicted

    No internal data stores are shown

    They are inside the system

    External data stores are shown as externalentities

    How do you tell the difference between aninternal and external data store?

  • 8/11/2019 05-DFD part 2

    6/26

    0

    Order

    System

    SALESREP

    CUSTOMER WAREHOUSE

    BANKACCOUNTING

    Order

    Order

    Reject

    Notice

    Picking

    List

    Completed

    Order

    Payment Invoice

    Commission Bank

    Deposit

    CashReceipts

    Entry

    Context

    Diagram of

    OrderSystem

  • 8/11/2019 05-DFD part 2

    7/26

    Level-0 DFD

    Shows the systems major processes, data flows,

    and data stores at a high level of abstraction

    When the Context Diagram is expanded into DFDlevel-0, all the connections that flow into and out of

    process 0 needs to be retained.

  • 8/11/2019 05-DFD part 2

    8/26

    0

    OrderSystem

    SALES

    REP

    CUSTOMER WAREHOUSE

    BANKACCOUNTING

    Order

    OrderReject

    Notice

    Picking

    List

    Completed

    Order

    Payment Invoice

    Commission Bank

    Deposit

    Cash

    ReceiptsEntry

    Context

    Diagram of

    OrderSystem

  • 8/11/2019 05-DFD part 2

    9/26

    1.0

    Fill

    Order

    2.0

    Create

    Invoice

    3.0

    Apply

    Payment

    SALES

    REP BANK ACCOUNTING

    CUSTOMER WAREHOUSE

    Order

    Order

    Reject

    Notice

    Picking List

    Accounts

    ReceivableD1

    Invoice

    Invoice

    Invoice

    DetailPayment

    Detail

    Payment

    Commission Bank Deposit Cash Receipts Entry

    Completed

    Order

    Level-0

    DFD of

    Order

    System

  • 8/11/2019 05-DFD part 2

    10/26

    Lower-Level Diagrams

    Functional Decomposition

    Balancing

  • 8/11/2019 05-DFD part 2

    11/26

    Decomposition of DFDs

    Functional decompositionAn iterative process of breaking a system description

    down into finer and finer detail

    Uses a series of increasingly detailed DFDs to

    describe an ISAct of going from one single system to many

    component processes

    Repetitive procedure

    Lowest level is called a primitive DFD

    Level-N DiagramsA DFD that is the result of n nested decompositions of

    a series of subprocesses from a process on a level-0diagram

  • 8/11/2019 05-DFD part 2

    12/26

    Balancing DFDs

    When decomposing a DFD, you must conserveinputs to and outputs from a process at the nextlevel of decomposition

    Ensures that the input and output data flows of

    the parent DFD are maintained on the child DFD This is called balancing

    Example: Hoosier Burgers In Figure 1, notice that there is one input to the

    system, the customer order Three outputs:

    Customer receipt

    Food order

    Management reports

  • 8/11/2019 05-DFD part 2

    13/26

    Figure 1

    Context diagram of Hoosier Burgers Food ordering

    system

  • 8/11/2019 05-DFD part 2

    14/26

    Balancing DFDs Example

    (Continued)

    Notice Figure 2. We have the same inputs

    and outputs

    No new inputs or outputs have been

    introduced

    We can say that the context diagram and

    level-0 DFD are balanced

  • 8/11/2019 05-DFD part 2

    15/26

    Figure 2

    Level-0 DFD of Hoosier Burgers food ordering system

  • 8/11/2019 05-DFD part 2

    16/26

    Balancing DFDs:

    An unbalanced example Figure 3:

    In context diagram, we have one input to the

    system, A and one output, BLevel-0 diagram has one additional data flow,

    C

    These DFDs are not balanced

  • 8/11/2019 05-DFD part 2

    17/26

    Figure 3: An unbalanced set of data

    flow diagrams

    SOURCE

    SINK

    (a) Context diagram

    (b) Level-0 diagram

    SOURCE 1

    SINK

    0

    SOURCE 2

    1.0

    2.0

    A B

    A

    C

    B

  • 8/11/2019 05-DFD part 2

    18/26

    Balancing DFDs

    We can split a data flow into separate data

    flows on a lower level diagram (see Figure

    4) Balancing leads to four additional

    advanced rules

  • 8/11/2019 05-DFD part 2

    19/26

    Example of data flow splitting

    x.0Payment & coupon

    x.1Payment

    x.2Coupon

    Composite data

    flow

    Disaggregated

    data flow

  • 8/11/2019 05-DFD part 2

    20/26

    Advanced Rule for DFD A composite DF on 1 level can be split into component

    DF as the next level, but no new data can be added n alldata in the composite must be accounted for in 1 ormore subfollows

    The inputs to a process must b sufficient to produce theoutputs from the process

    At the lowest level of DFD, new data flows may beadded to represent data that r transmitted underexceptional condition, these data flows typicallyrepresent error message

    To avoid having data flow lines cross each other, u may

    repeat data strores or sources/sinks on a DFD. Use anadditional symbol, like a double line on the middlevertical line of data strore symbol, or a diagonal line in acorner of a sink/source square to indicate a repeatedsymbol

  • 8/11/2019 05-DFD part 2

    21/26

    Strategies for Developing DFDs

    Top-down strategy

    Create the high-level diagrams (Context

    Diagram), then low-level diagrams (Level-0diagram), and so on

    Bottom-up strategy

    Create the low-level diagrams, then higher-level diagrams

  • 8/11/2019 05-DFD part 2

    22/26

    Exercise:

    Precision Tools sells a line of high-quality woodworkingtools. When customers place orders on the companys

    Web site, the system checks to see if the items are in

    stock, issues a status message to the customer, and

    generates a shipping order to the warehouse, which fills the

    order. When the order is shipped, the customer is billed.The system also produces various reports, such as

    inventory reports for Accounting.

    Draw a context diagram for the order system

    Draw DFD diagram 0 for the order system

  • 8/11/2019 05-DFD part 2

    23/26

    Identify Entities,Process,Data Stores & Data Flow

    Entities

    Customer

    Warehouse

    Accounting

    Processes

    1.0 Check Status 2.0 Issue Status Messages

    3.0 Generate Shipping Order

    4.0 Manage Accounts

    Receivable

    5.0 Produce Reports

    Data Stores

    D1 Pending Orders

    D2 Accounts Receivable

    Data Flows Order

    In-Stock Request

    Order Data

    Status Data

    Status Message Shipping Order

    Order Data

    Invoice

    Shipping Confirmation

    Payment

    Accounting Data

    Accounts Receivable Data

    Order Data

    Inventory Reports

    1.0

    2.0

    3.0

    4.0

    5.0

  • 8/11/2019 05-DFD part 2

    24/26

    ACCOUNTING

    WAREHOUSECUSTOMER

    0

    Order

    System

    Order

    Payment

    In-Stock

    Request

    StatusMessage

    Invoice Shipping Confirmation

    ShippingOrder

    InventoryReports

    Context Diagram of Order System

  • 8/11/2019 05-DFD part 2

    25/26

    1.0

    CheckStatus

    2.0

    IssueStatus

    Messages

    3.0

    GenerateShippingOrder

    ACCOUNTING

    CUSTOMER WAREHOUSE

    4.0

    ManageAccountsReceivable

    5.0

    ProduceReports

    Order In-Stock Request

    Status Data

    Status

    Message

    PendingOrdersD1

    OrderData

    Order Data

    ShippingOrder

    ShippingConfirmation

    Invoice

    Payment

    AccountsReceivableD2

    Accounting Data Accounts Receivable Data

    Order Data

    InventoryReports

    Level-0 of

    Order

    System

  • 8/11/2019 05-DFD part 2

    26/26