2080 2

CSC326 ยท 2080 ยท 10 marks

What do you mean by balancing DFDs? Draw context diagram and data flow diagrams for online movie rental system that allows its users to watch movies online.

What do you mean by balancing DFDs? Draw context diagram and data flow diagrams for online movie rental system that allows its users to watch movies online.[10]

System Analysis and DesignChapter 3: AnalysisData Flow Diagrams

Quick answer

Balancing DFDs refers to the consistency that must be maintained between a parent DFD and its child DFD (exploded diagram) when decomposing a process into more detail.

Balancing DFDs and DFDs for Online Movie Rental System


Part 1: Balancing DFDs

Key Rules for Balancing:

  • Every data flow entering or leaving a process on a higher-level DFD must also appear on the corresponding lower-level (child) DFD for that process.
  • The inputs and outputs of a parent process must exactly match the inputs and outputs of the child diagram that decomposes it.
  • No new external entities should appear in a child DFD that were not present or implied in the parent.
  • Data stores that are used only within a child diagram (internal data stores) do not need to appear in the parent diagram, but any data store shared across processes must be consistent.

In short: what goes in and what comes out of a process must be the same at every level of decomposition.


Part 2: Context Diagram and DFDs for Online Movie Rental System

System Description

The Online Movie Rental System allows users to:

  • Register and log in
  • Browse and search movies
  • Rent/stream movies online
  • Make payments
  • Receive recommendations
  • Administrators manage movie catalog and generate reports

Level 0: Context Diagram

The context diagram shows the entire system as a single process with all external entities and major data flows.

                        Registration/Login Info
                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                   โ”‚                                 โ–ผ
           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
           โ”‚              โ”‚  Movie Search โ”‚                       โ”‚
           โ”‚    USER /    โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚                       โ”‚
           โ”‚   CUSTOMER   โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚   ONLINE MOVIE        โ”‚
           โ”‚              โ”‚  Movie Stream โ”‚   RENTAL SYSTEM       โ”‚
           โ”‚              โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚     (Process 0)       โ”‚
           โ”‚              โ”‚  Payment Info โ”‚                       โ”‚
           โ”‚              โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚                       โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚                       โ”‚
                                         โ”‚                       โ”‚
           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚                       โ”‚
           โ”‚              โ”‚ Movie Detailsโ”‚                       โ”‚
           โ”‚   ADMIN /    โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚                       โ”‚
           โ”‚  MANAGEMENT  โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                       โ”‚
           โ”‚              โ”‚  Reports     โ”‚                       โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚                       โ”‚
                                         โ”‚                       โ”‚
           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚                       โ”‚
           โ”‚   PAYMENT    โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                       โ”‚
           โ”‚   GATEWAY    โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚                       โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  Payment     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             Confirmation

External Entities:

EntityRole
User/CustomerRegisters, searches, rents, and streams movies
Admin/ManagementManages catalog, views reports
Payment GatewayProcesses payment transactions

Level 1: DFD (Decomposition of Process 0)

This diagram breaks the main system into major sub-processes.

USER
 โ”‚
 โ”‚ Registration Info
 โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Process 1.0     โ”‚        โ”‚                 โ”‚
โ”‚  User            โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚  D1: USER DB    โ”‚
โ”‚  Registration    โ”‚        โ”‚                 โ”‚
โ”‚  & Login         โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚
        โ”‚ Verified User
        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Process 2.0     โ”‚        โ”‚                 โ”‚
โ”‚  Browse &        โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚  D2: MOVIE DB   โ”‚
โ”‚  Search Movies   โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚
        โ”‚ Selected Movie
        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Process 3.0     โ”‚        โ”‚                 โ”‚
โ”‚  Rental &        โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚  D3: RENTAL DB  โ”‚
โ”‚  Streaming       โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚
        โ”‚ Rental/Payment Request
        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Process 4.0     โ”‚        โ”‚                 โ”‚
โ”‚  Payment         โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚ PAYMENT GATEWAY โ”‚
โ”‚  Processing      โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚
        โ”‚ Payment Confirmation
        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Process 5.0     โ”‚        โ”‚                 โ”‚
โ”‚  Report          โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚  ADMIN /        โ”‚
โ”‚  Generation      โ”‚        โ”‚  MANAGEMENT     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ–ฒ
        โ”‚ Data from D1, D2, D3

Level 2: DFD for Process 3.0 - Rental and Streaming (Exploded)

This shows balancing: inputs/outputs of Process 3.0 match those in Level 1.

                    Selected Movie (from Process 2.0)
                              โ”‚
                              โ–ผ
                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                   โ”‚  Process 3.1        โ”‚
                   โ”‚  Check Movie        โ”‚โ—„โ”€โ”€โ”€โ”€ D2: MOVIE DB
                   โ”‚  Availability       โ”‚
                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚ Available Movie
                              โ–ผ
                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                   โ”‚  Process 3.2        โ”‚
                   โ”‚  Create Rental      โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ D3: RENTAL DB
                   โ”‚  Record             โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€ D3: RENTAL DB
                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚ Rental Confirmed
                              โ–ผ
                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                   โ”‚  Process 3.3        โ”‚
                   โ”‚  Stream Movie       โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ USER (Movie Stream)
                   โ”‚  to User            โ”‚
                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚ Rental/Payment Request
                              โ–ผ
                 (passed on to Process 4.0: Payment Processing)

Balancing Check

The Level 2 diagram takes exactly one input, Selected Movie from Process 2.0, and produces exactly one output, Rental/Payment Request to Process 4.0, which are the same input and output shown for Process 3.0 in the Level 1 diagram. The internal sub-processes (3.1, 3.2, 3.3) and the internal use of D3: RENTAL DB are visible only inside this exploded diagram, which is consistent with the balancing rule that a child DFD's external inputs and outputs must match its parent process exactly, while its internal detail need not appear at the parent level.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.